Files
c3c/test/test_suite/generic/recursive_generic2.c3
2026-01-18 00:33:43 +01:00

22 lines
419 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;
}