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
406 stars 78 forks source link

Parameterized Syntax: Undeclared type error #1775

Open TarVK opened 1 year ago

TarVK commented 1 year ago

Describe the bug

When using a parameterized syntax type, type reification does not appear to work. It errors mentioning that the type is not declared

To Reproduce

Steps to reproduce the behavior:

  1. Declare:
    syntax Opt[&K] = | &K;
    syntax P = "a";
  2. Try to execute #Opt[P]
  3. Observer error: "Undeclared type: Opt"

Expected behavior The reified type should be returned. This does work properly when using Opt elsewhere, such as:

syntax Q = Opt[P];
#Q;

Screenshots

image

Desktop (please complete the following information):

jurgenvinju commented 1 year ago

thanks @TarVK ; will have a look.