mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Detect recursive creation of generics #2366.
This commit is contained in:
14
test/test_suite/generic/recursive_generic.c3
Normal file
14
test/test_suite/generic/recursive_generic.c3
Normal file
@@ -0,0 +1,14 @@
|
||||
module test;
|
||||
import test1;
|
||||
|
||||
fn int main() => 0;
|
||||
|
||||
Aa {int} a;
|
||||
|
||||
module test1 {Type};
|
||||
import test2;
|
||||
alias Cc = Aa {Bb {Type}}; // #error: Generic resolution of this type has become deeply nested
|
||||
struct Aa {Type a;}
|
||||
|
||||
module test2 {Type};
|
||||
struct Bb {Type b;}
|
||||
Reference in New Issue
Block a user