ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

An instance creation expression using a constructor on an abstract class causes an exception #63

Closed seidewitz closed 6 years ago

seidewitz commented 6 years ago

It is a constraint violation to attempt to instantiate an abstract class unless there is an "Impl" package that provides a concrete implementation for the abstract class. The code that checks for an "Impl" package checks whether the the referenced class is "completely bound" and, if so, searches the namespace of the original template for the class, rather than the namespace itself. Unfortunately, this code presumes that the ElementReferenceImpl.isCompletelyBound method returns true only if the referenced element is actually a completely bound template instantiation. In reality, the method also returns true if the referenced element is not a template instantiation at all. In this case, getting the namespace of the presumed template causes a null pointer exception.

seidewitz commented 6 years ago

Resolved in v1.1.0d.