Skip to content

IsDefined operator in compiled Rascal broken #966

@jurgenvinju

Description

@jurgenvinju

Currently it is implemented by catching Exception (see is_defined_loc_field_access_get in RascalPrimitive) which hides accidental bugs and also expected IO exceptions from URIInputResolvers. Some tests were succeeding because of accidental null pointer exceptions caught by this implementation and turned into false.

The current interpreter has ? implemented specifically for every kind of field or access you can do and checks up front if the requested value is defined. No more exceptions. For now isDefinedLoc4() is ignored by the compiler tests to work around the problem (to be merged soon).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions