-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dartc does not produce a warning when trying to call an inaccessible method #3266
Comments
Added Area-Analyzer, Triaged labels. |
Added this to the M1 milestone. |
https://chromiumcodereview.appspot.com/10537006 Added Started label. |
https://code.google.com/p/dart/source/detail?r=8291 Added Fixed label. |
This comment was originally written by [email protected] This warning seems to have been changed from static type to resolver, which contradicts the spec ("Super invocation") |
I assume you're referring to the strings "STATIC_TYPE" and "RESOLVER" that appear in the error message. Those strings refer to the portion of code from which the error was reported, not the kind of error being reported (where "kind" refers to the kinds of errors defined in the specification: "compile-time errors", "static warnings", "static type warnings", "dynamic type errors" and "run time errors"). There is not necessarily any correlation between the two. |
This comment was originally written by [email protected] well, there ought to be some correlation, otherwise we can't test specifically for different kinds of warnings prescribed by the spec |
My understanding (which could easily be wrong) is that the test framework is not currently testing the type of error generated. Nevertheless, I agree. We are re-writing the analyzer and one of the changes is that errors will no longer carry along information about where in the code they were generated but will know what kind of error they are. We can retrofit this into the current analyzer if necessary, but I'd rather not do the work unless it's essential. |
This comment was originally written by [email protected] Tweaking two analyzers at once is hardly essential |
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/4d7dc93..f2bb6e9): f2bb6e92 2022-12-07 Sam Rawlins Bump to 6.1.4 (#3266) fixnum (https://github.com/dart-lang/fixnum/compare/62916f2..e4f5e97): e4f5e97 2022-12-08 Michael Thomsen Change IntegerDivisionByZeroException to UnsupportedError (#100) 3bd726f 2022-12-08 Devon Carew rev the sdk min to 2.19.0-0 (#99) logging (https://github.com/dart-lang/logging/compare/f322480..0373ef8): 0373ef8 2022-12-07 Mushaheed Syed Add a check that throws if a logger name ends with '.' (#123) 6d46d71 2022-12-06 Devon Carew Create no-response.yml (#124) protobuf (https://github.com/dart-lang/protobuf/compare/4f3e328..2706b53): 2706b53 2022-12-07 Mahdi K. Fard Add type to a method parameter (#782) a57c16a 2022-12-07 Mahdi K. Fard Fix a typo (#781) shelf (https://github.com/dart-lang/shelf/compare/1c21047..32e342d): 32e342d 2022-12-08 István Soós Prepare the release of shelf_router_generator (#316) 06e2fe6 2022-12-08 Kevin Moore shelf: drop non-null-safe tests (#317) 98363fd 2022-12-06 Kevin Moore lint: sort pub dependencies ad6af2a 2022-12-06 Kevin Moore shelf_static: move RegExp creation out of every request test (https://github.com/dart-lang/test/compare/4dceb87..73cd754): 73cd7540 2022-12-07 Nate Bosch Record the working directory for VM platform (#1804) e40274a6 2022-12-07 Nate Bosch Restore mono_repo config (#1810) 02d8764e 2022-12-07 Sigurd Meldgaard Use Future for return type in runner `main()`. (#1809) 3d6039b3 2022-12-05 Nate Bosch Merge test selections by path (#1806) webdev (https://github.com/dart-lang/webdev/compare/e39506e..3e2364e): 3e2364e 2022-12-07 Elliott Brooks (she/her) Add the Dart Debugger / Flutter Inspector panels in Chrome DevTools (#1812) c164231 2022-12-07 Elliott Brooks (she/her) Small fix to the extension test (#1811) 4bbb4d0 2022-12-06 Elliott Brooks (she/her) Gracefully handle debugger disconnect events (#1808) d3892cf 2022-12-05 Elliott Brooks (she/her) Refactor puppeteer tests to use `Worker` type (#1809) Change-Id: I42033e849f40f209831cfb344247b24ad7731ff0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274580 Reviewed-by: Nate Bosch <[email protected]> Commit-Queue: Devon Carew <[email protected]>
This is an accumulation of 12 commits to dartdoc, imported into dart-lang/sdk across 4 commits, noted below. I've also stripped out the changes made to any other repository in this DEPS file. Revisions updated by `dart tools/rev_sdk_deps.dart`. From cabf333: dartdoc (https://github.com/dart-lang/dartdoc/compare/eb90a44..1f42216): 1f422163 2022-12-13 Sam Rawlins Bump to 6.1.5 (#3274) From a3b7a76: eb90a44c 2022-12-12 Sam Rawlins Remove annotations from the features section of each element (#3268) 16126376 2022-12-12 Parker Lougheed Don't show null in search results when no description (#3273) 3ff7aa75 2022-12-12 Sam Rawlins Fix search arrows by using a flat list of suggestions (#3271) 90264fb4 2022-12-12 dependabot[bot] Bump github/codeql-action from 2.1.35 to 2.1.36 (#3270) bede500d 2022-12-12 Sam Rawlins Fix remote linking in 2.18 and 3.0.0 (#3267) From 0c14719: dartdoc (https://github.com/dart-lang/dartdoc/compare/4d7dc93..f2bb6e9): f2bb6e92 2022-12-07 Sam Rawlins Bump to 6.1.4 (#3266) From 3a1d7c7: dartdoc (https://github.com/dart-lang/dartdoc/compare/dc502d0..4d7dc93): 4d7dc93b 2022-12-05 dependabot[bot] Bump github/codeql-action from 2.1.31 to 2.1.35 (#3263) bcf8b6e8 2022-12-05 Parker Lougheed Weight enums the same as classes for searching (#3260) 7d95578b 2022-12-04 Parker Lougheed Update template descriptions (#3258) d558f043 2022-12-04 Parker Lougheed Fix error when using base element href (#3256) c3663762 2022-12-04 Parker Lougheed Add unnecessary override ignore to fix build (#3257) Change-Id: I21fc9ecd36db78b7ef420bd179af4907e667557d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279320 Reviewed-by: Kevin Moore <[email protected]> Commit-Queue: Kevin Chisholm <[email protected]>
This issue was originally filed by [email protected]
What steps will reproduce the problem?
There is a library:
library('lib');
class C {
_method() {}
}
Run the following test with Dartc:
import('lib.dart');
class D extends C {
test() {
super._method(); //should be a static warning
}
}
main() {
C c;
c._method(); //should be a static warning
}
What is the expected output? What do you see instead?
Expected: static warnings on the marked lines.
Actual: no static warnings
What version of the product are you using? On what operating system?
Dartc, r8026. OS Ubuntu 10.04
Please provide any additional information below.
Tests in co19: Language/10_Expressions/14_Method_Invocation/1_Ordinary_Invocation_A06_t02.dart
Language/10_Expressions/14_Method_Invocation/1_Super_Invocation_A06_t02.dart
The text was updated successfully, but these errors were encountered: