Skip to content

Actually access the nested property #683

@jrentlez

Description

@jrentlez

Consider the following example:

valuetype WholeNumbers {
  property inner oftype integer;
  constraint isPositive: inner >= 0;
}
valuetype NaturalNumbers {
  property outer oftype WholeNumbers;
  constraint isNonNull: outer.inner != 0;
}

When evaluating outer.inner, we just fetch the value for outer, which is already an integer, and ignore .inner. This is correct for now, because referencing value types with multiple properties is forbidden. Once this is no longer true, we need to remember to change this.

(See the getValueForNestedAccess() function for the relevant code snippet.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions