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

Analyzer: built in identifiers cannot be used as type annotations - compile time error #3475

Closed
DartBot opened this issue Jun 8, 2012 · 3 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-duplicate Closed in favor of an existing report
Milestone

Comments

@DartBot
Copy link

DartBot commented Jun 8, 2012

This issue was originally filed by [email protected]


This is a co19 test:

/tests/co19/src/Language/07_Classes/07_Classes_A04_t20.dart

class A {
   static abstract method() {}

That's nutty, it shouldn't work, right? Well, co19 specifis a compile time error but doesn't reference a specific part of the spec. However, the analyzer flags it as a static type warning because there is no type named 'abstract' defined. I think the latter is correct, since 'abstract' is a pseudo keyword, not a reserved word.

I just wanted a second pair of eyes on this before I filed a co19 bug.

@DartBot
Copy link
Author

DartBot commented Jun 8, 2012

This comment was originally written by [email protected]


NM, it is specified in 10.28 that built-in identifiers (pseudo keywords) can't be used as type annotations.


Added this to the M1 milestone.
Removed Area-Language label.
Added Area-Analyzer label.

@DartBot
Copy link
Author

DartBot commented Jun 8, 2012

This comment was originally written by [email protected]


Changed the title to: "Analyzer: built in identifiers cannot be used as type annotations - compile time error".

@scheglov
Copy link
Contributor

scheglov commented Jun 9, 2012

Set owner to @scheglov.
Added Duplicate label.
Marked as being merged into #3307.

@DartBot DartBot added Type-Defect area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-duplicate Closed in favor of an existing report labels Jun 9, 2012
@DartBot DartBot added this to the M1 milestone Jun 9, 2012
copybara-service bot pushed a commit that referenced this issue Aug 4, 2022
Changes:
```
> git log --format="%C(auto) %h %s" 9bf4289..ac7db6c
 https://dart.googlesource.com/pub.git/+/ac7db6c0 Fix string shortening (#3512)
 https://dart.googlesource.com/pub.git/+/4ed0d5cd Add pubspec_overrides.yaml to basicIgnoreRules (#3503)
 https://dart.googlesource.com/pub.git/+/d8f4c549 Remove all support for legacy .packages file (#3507)
 https://dart.googlesource.com/pub.git/+/1722b6a8 Update 2-BUG.md (#3495)
 https://dart.googlesource.com/pub.git/+/e60ef647 Add lint avoid_print (#3475)

```

Diff: https://dart.googlesource.com/pub.git/+/9bf4289d6fd5d6872a8929d6312bbd7098f3ea9c~..ac7db6c07318efa4a8712110275eaf70f96a6d00/
Change-Id: I730a048dbf10992270f74ddde47824cc071a3994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253663
Commit-Queue: Sigurd Meldgaard <[email protected]>
Reviewed-by: Alexander Thomas <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

2 participants