You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling the following example gives unexpected error messages that suggest that the Rascal grammar (indeed imported by StaticTestingUtils) is still visible when the Pico grammar is being checked. Both grammars indeed use the names body and name in their rules but this should not lead to this confusion.
error("Field body already defined as type {Statement ;}* on non-terminal type Statement, cannot redefine to type Statement",|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|(20573,9,<588,7>,<588,16>))
error("Field name already defined as type Id on non-terminal type Expression, cannot redefine to type Name",|project://rascal/src/org/rascalmpl/library/lang/rascal/syntax/Rascal.rsc|(6414,10,<194,7>,<194,17>))
The text was updated successfully, but these errors were encountered:
This example comes from lang::rascal::tests::types::PatternTCTests and I just noticed that the import of demo::lang::Pico::Syntax is completely redundant. So in that specific case this error is no show stopper, but it may bite us in the future :-(
I'll have to go back and look through prior notes, but I think this is clashing with what we decided earlier. Part of the reason we are seeing this is because we are bringing in all the syntax info transitively, even when it isn't in scope, since the compiler needed this. It may be possible, in that case, to have it not register the sorts into the global sort map, but this may cause all sorts of confusion as well.
You are right this seems to be a recurring theme and that probably means that we have not yet found the ideal solution. As for now, let's keep the issue open but wait to address it when a more urgent occurrence surfaces.
Compiling the following example gives unexpected error messages that suggest that the Rascal grammar (indeed imported by
StaticTestingUtils
) is still visible when the Pico grammar is being checked. Both grammars indeed use the namesbody
andname
in their rules but this should not lead to this confusion.gives
The text was updated successfully, but these errors were encountered: