Files
c3c/test/test_suite/generic/recursive_generic2.c3
2025-12-29 17:01:03 +01:00

22 lines
421 B
Plaintext

module foo { Type };
import std::collections::list;
struct Foo { // #error: Recursive definition of 'Foo{int}'
Type foo;
Allocator allocator;
List { Foo } children;
}
module test;
import std::collections::list;
import foo;
fn int main(String[] args)
{
Foo { int } test;
// assume we add children here but it's irrelevant for the repro
Foo {int} [] range = test.children[4:20];
return 0;
}