Skip to content

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

@seidewitz

Description

@seidewitz

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions