usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
407 stars 77 forks source link

constructors with empty field names break #2054

Open jurgenvinju opened 1 month ago

jurgenvinju commented 1 month ago

Describe the bug

rascal>data C = c();
ok
rascal>data B = and(B,B) | or(C, C) | d();
|prompt:///|(20,8,<1,20>,<1,28>): The field name arg1 is illegally used for both C and B in type B
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/RedeclaredField|
ok

breaks in different kinds of ways. first warnings are printed and then constructor calls don't work

rascal>and(d(),d())
|prompt:///|(4,1,<1,4>,<1,5>): Undeclared variable: d
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UndeclaredVariable|
ok