Skip to content

[SUGGESTION] Issue with contextual keywords #1268

Open
@AbrasiveBoar902

Description

@AbrasiveBoar902

As described in the doc, type can be used as an ordinary name

type : i32 = 1;

or

type : type = {
    data: i64;
}

However, when type is used as the type of a NTTP, it becomes ambiguous.

foo : <value : type> () = {} // value is a type
foo : <value : ::type> () = {} // value is a nttp
value : type = {} // value is a type
value : ::type = () // value is a variable
test : <T> type = {
    type: type == std::xxxxxx_t<T, xxx>;
    foo : <value : type> () = {} // value is a type
    foo : <value : ???> () = {} // what to write here ?
}

Is there any better way to identify them?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions