Check if child is weak subtype of java.lang.Throwable


as part of my language i'm developing, I have an operation concept, that may throws an exception (or more). To realize this feature, I've taken a closer look at BaseMethodDeclaration, which also has such a feature (throwItems): I'm currently about to implement the type check, however, I'm not able to identify the proper model/language I need for getting the following line to run:

for (node<Type> throwsItem : operation.throwsItem) {
  infer throwsItem :<=: <Throwable>;

as the "Throwable" simply cannot be found.

Using Ctrl+R to search for the model and import it does not change the situation!

Thanks a lot,

stupid me...realized my fault.
however, what still makes me curious is how the scope for the throwItems is calculated, as I can't find it...
Thanks for any help.

In this example it is specified that each throwsItem is a sub-type of "Throwable" ClassifierType.

Please sign in to leave a comment.