test(metatype): lock by-value self-ref rejection for constructed enums (1182)

Constructed-type companion to examples/1178 (source form): a declare/
define enum whose variant references itself BY VALUE is rejected by the
same checkInfiniteSize guard ('infinitely sized'). Pins the use-before-
define corner of the validation story — by-value self-reference is the
one self-ref shape that isn't legal; *L (pointer) is fine (see 0618).
No compiler change (locks existing behavior).
This commit is contained in:
agra
2026-06-17 06:42:02 +03:00
parent fe6799545a
commit dcdf1dd318
4 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1 @@
error: type 'L' is infinitely sized (it contains itself by value); use a pointer ('*L') to break the cycle