Accessing the inferred type in AbstractEquationStatement

I would like to customize the error string of a check-only equation in the typesystem, but I find that when typeof(...) is used in the error string expression, the result is the variable that represents the type of the argument, but not the concrete inferred type. So the error string looks like "expected type f", where f is the name of the type variable.


There is , but the node in this case does not have a field named type. Of course, since this is in the typesystem itself, j.m.l.typesystem is already in scope.


How would I access the concrete inferred type there?


Thanks in advance.


You should wait for the type to be calculated with "when concrete".




It should be used differently:


Thanks. I saw the use of when concrete in the typesystem of the base language, but unfortunately it seems to be unavailable for an error string:



Oh okay, I am rather new to this. Thank you!


Please sign in to leave a comment.