Using typesystem information for scope constraining

Hi,

is it possible to use the type information derived from an inference rule within the constraints aspect by using the .type expression on a node?

 

Regards, 

Henning

3 comments

Yes, it's possible and it's in fact what DotExpression operations do in BaseLanguage - the available operations after the dot depend on the type of the expression before the dot.

1

Okay, are there any additional imports/dependencies I have to define for the constraint aspect?

0

Found it, have to import jetbrains.mps.lang.typesystem language in the constraint aspect. 

Thanks @Sergej for the DotExpression hint

 

1

Please sign in to leave a comment.