Skip to content

Range constraints should allow 'First to be used when defining the lower bound of a range #55

@pchapin

Description

@pchapin

Currently it is possible to use 'Last to specify the upper bound of a range based on some other type's upper bound like this:

typedef int T1 range 1 .. 10;
typedef int T2 range 5 .. T1'Last;

However, the following does not work, and probably should for symmetry if nothing else (not to mention it might be useful):

typedef int T1 range 1 .. 10;
typedef int T2 range T1'First .. 5;

Currently Mercury only allows the lower bound of a range to be a constant, not any form of identifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmercuryPertaining to the Mercury IDL compiler

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions