Skip to content

Specification: Introduce a notion of static invocations #3759

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

Open
eernstg opened this issue Sep 18, 2018 · 0 comments
Open

Specification: Introduce a notion of static invocations #3759

eernstg opened this issue Sep 18, 2018 · 0 comments
Labels
specification technical-debt Dealing with a part of the language which needs clarification or adjustments

Comments

@eernstg
Copy link
Member

eernstg commented Sep 18, 2018

Cf. dart-lang/sdk#34492, we need the special rule

It is a compile-time error to invoke any of the methods of class 
\code{Object} on a prefix object (\ref{imports})
or on a constant type literal that is immediately followed by
the token `.'\,.

in order to ensure that int.toString() and similar "Object instance method invocations" is a compile-time error. It would be better to specify all static invocations directly and as a separate concept, and then hopefully we could delete this special rule. With that, the expression int.toString() would be a compile-time error because (1) it is a static invocation, so toString can only be a static method, (2) there is no such static method.

@eernstg eernstg transferred this issue from dart-lang/sdk May 2, 2024
@eernstg eernstg added specification technical-debt Dealing with a part of the language which needs clarification or adjustments labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specification technical-debt Dealing with a part of the language which needs clarification or adjustments
Projects
Development

No branches or pull requests

1 participant