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
module experiments::Compiler::Examples::Tst
value main(list[value] args) = type(\int(), _) := #int;
gives with the interpreter
rascal>main([])
value: false <=== should be true
and with the compiler it gives a static error (but should be accepted):
rascal>execute(|rascal:///experiments/Compiler/Examples/Tst.rsc|, [], recompile=true)
...
error("Cannot match an expression of type: reified[int] against a pattern of type reified[value]",|project://rascal/src/org/rascalmpl/library/experiments/Compiler/Examples/Tst.rsc|(76,15,<3,31>,<3,46>))
@mahills can you have a look at this type checker issue?
The text was updated successfully, but these errors were encountered:
This appears to be because Type needs to be imported in order to get the various constructors that are used (e.g., \int()) in the matches. If I do that, this works fine.
Agreed, given the way the pattern matching code works the type checker tends to "hide" messages that come out of it, since this could lead to a number of spurious messages, but it's sometimes hiding these too well. I'll look at rebalancing this.
Reported by @tvdstorm:
gives with the interpreter
and with the compiler it gives a static error (but should be accepted):
@mahills can you have a look at this type checker issue?
The text was updated successfully, but these errors were encountered: