Detect recursive creation of generics #2366.

This commit is contained in:
Christoffer Lerno
2025-08-05 02:55:32 +02:00
parent 5292e08cd6
commit 229fdd6193
4 changed files with 23 additions and 0 deletions

View 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;}