Skip to content

Matching of a reified type does not work properly (in interpreter and compile) #708

Closed
@PaulKlint

Description

@PaulKlint

Reported by @tvdstorm:

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions