| author | |
| committer | |
| log | 2ad6ca581da28a547b33d93f1a9855974a8b15c1 |
| tree | 32199316e5f3c16a7047802fdac272271c79bdd0 |
| parent | 16dcefaca5956af747c29d6ab1915cc955f81af9 |
Closes #6312. In the C++ implementation this caused a stack overflow
from infinite recursion during analysis.1 files changed, 10 insertions(+), 0 deletions(-)
test/behavior/bugs/6305.zig created+10| ... | ... | @@ -0,0 +1,10 @@ |
| 1 | const ListNode = struct { | |
| 2 | next: ?*const @This() = null, | |
| 3 | }; | |
| 4 | ||
| 5 | test "copy array of self-referential struct" { | |
| 6 | comptime var nodes = [_]ListNode{ .{}, .{} }; | |
| 7 | nodes[0].next = &nodes[1]; | |
| 8 | const copy = nodes; | |
| 9 | _ = copy; | |
| 10 | } |