Skip to content

Expect compile-time error on native keyword in static analysis #1606

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

Closed
DartBot opened this issue Feb 9, 2012 · 3 comments
Closed

Expect compile-time error on native keyword in static analysis #1606

DartBot opened this issue Feb 9, 2012 · 3 comments
Assignees

Comments

@DartBot
Copy link

DartBot commented Feb 9, 2012

This issue was originally filed by [email protected]


The 'native' keyword is supposed to only be allowed in core libraries.

SyntaxtTest 29 & 30 are failing

Here's a simple repro case:

$ cat >/tmp/t.dart
class NativeClass
native "FooBar" /// 30: compile-time error
{}
main() {
}
$ dartc /tmp/t.dart

We expect dartc to throw a compile-time error in this case, but it runs without any errors.

@scheglov
Copy link
Contributor

Set owner to @scheglov.
Added Accepted label.

@scheglov
Copy link
Contributor

@scheglov
Copy link
Contributor

copybara-service bot pushed a commit that referenced this issue Dec 18, 2024
This is a minor change with just bug fixes:

* Handle trailing commas in for-loop updaters (#1354).
* Format `||` patterns like fallthrough cases in switch expressions (#1602).
* Handle comments and metadata before variables more gracefully (#1604).
* Ensure comment formatting is idempotent (#1606).
* Better indentation of leading comments on property accesses in binary operator
  operands (#1611).
* Don't crash on doc comments in local variable declarations (#1621).

This won't affect much code, but it does change the formatting in some cases.

Change-Id: I2d52fee92aecbc24315e4f1a89360af85ec85942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401482
Auto-Submit: Bob Nystrom <[email protected]>
Commit-Queue: Alexander Thomas <[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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants