-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Local function should not be static #1018
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Removed Priority-Medium label. |
Removed Area-Frog label. |
For this code we report three errors. We should clean that up and make the error message better. warning: cannot resolve type static main() { Set owner to @karlklose. |
Added this to the Later milestone. |
Removed this from the Later milestone. |
Added this to the M2 milestone. |
Fixed in r19671. Added Fixed label. |
Revisions updated by `dart tools/rev_sdk_deps.dart`. ecosystem (https://github.com/dart-lang/ecosystem/compare/babf5d1..ed39318): ed39318 2023-09-14 Devon Carew validate a prerelease setup-dart version (#169) b3dc96f 2023-09-14 Devon Carew fix an issue rendering multi-line changelogs (#171) http (https://github.com/dart-lang/http/compare/e19094a..decefa6): decefa6 2023-09-15 Brian Quinlan Remove invalid status line tests and replace them with valid status line tests (#1018) native (https://github.com/dart-lang/native/compare/4f4d7c3..a5d8809): a5d8809 2023-09-18 Daco Harkes [native_toolchain_c] Bump version (#140) tools (https://github.com/dart-lang/tools/compare/1512f3d..63d8267): 63d8267 2023-09-18 Elias Yishak Restrict surveys for certain tools (#161) 5a1fc54 2023-09-14 Devon Carew validate a pre-release setup-dart action (#160) webdev (https://github.com/dart-lang/webdev/compare/501ccc2..d7e0d1f): d7e0d1ff 2023-09-15 Devon Carew test the latest setup-dart action (#2233) 4e231bc3 2023-09-14 Elliott Brooks Fix copying over `client.dart.js` to `client.js` when build DWDS (#2232) Change-Id: Iac8741aed14591402b1c8a3cd33dc00e4648ac0c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326720 Commit-Queue: Devon Carew <devoncarew@google.com> Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
(This is a clone of issue #965, which appears on both dartc and frog)
What steps will reproduce the problem?
Run the following test:
f() {
static localFunction() {}
}
main() {
f();
}
What is the expected output? What do you see instead?
Expected: compile-time error
Actual: static warning: no such type "static"
Please provide any additional information below.
The Language Specification in the section 6.1 states: "It is a compile-time error to preface a function declaration with the built-in
identifier static."
The text was updated successfully, but these errors were encountered: