Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] Issue with contextual keywords #1268

Open
AbrasiveBoar902 opened this issue Sep 1, 2024 · 2 comments
Open

[SUGGESTION] Issue with contextual keywords #1268

AbrasiveBoar902 opened this issue Sep 1, 2024 · 2 comments

Comments

@AbrasiveBoar902
Copy link

AbrasiveBoar902 commented Sep 1, 2024

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?

@JohelEGP
Copy link
Contributor

JohelEGP commented Oct 4, 2024

    foo : <value : ???> () = {} // what to write here ?

test<T>::type.

Is there any better way to identify them?

You already are with those ::s.

@JohelEGP

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants