Sam Rawlins
23cf1230d0
Analyzer: Re-categorize StrongModeCode.INVALID_CAST_* codes as CompileTimeErrorCodes
...
I found literally zero tests for INVALID_CAST_FUNCTION_EXPR, and I was
unable to write any code that triggers it. :/
The rest are classified as compile-time errors in CFE; I am confident
that "compile-time error" is the correct classification.
Change-Id: Ib0cf543b983f8e28b45d40cc9cd4dc9f14b2f387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155302
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-22 00:34:45 +00:00
Sam Rawlins
3eaa777384
Analyzer: Remove unnecessary usage of StaticTypeAnalyzer2TestShared
...
Change-Id: I21dfbe84ced399a1204f43952171f41d453faaaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-21 23:36:55 +00:00
Konstantin Shcheglov
e653358a6c
Issue 42770. Support closures when checking for instance elements referenced from static.
...
Bug: https://github.com/dart-lang/sdk/issues/42770
Change-Id: Ic9ea429a50ad8aa807f2f2c33667d3c4fbc9b169
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155144
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-21 18:12:04 +00:00
Konstantin Shcheglov
204d22467b
Use WithNullSafetyMixin instead of direct AnalysisOptionsImpl.
...
Change-Id: Ib950d298e3008e708398cb6e8d8d0b3e57114dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-21 16:16:28 +00:00
Sam Rawlins
6c7eeb2697
Analyzer: Mark top-level getters used in ??= as used.
...
Fixes https://github.com/dart-lang/sdk/issues/42668
Change-Id: I82e85c4ee9b10605adc666f17dd3c3efc26280e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-21 03:46:29 +00:00
Konstantin Shcheglov
86ec742832
Switch to new Scope(s).
...
No much changes to resolution itself, only to the way how we create
scopes. But we still use `lookupIdentifier` that is basically the old
approach to resolution.
This also moves the fix of https://github.com/dart-lang/sdk/issues/42620
to TypeNameResolver.
I will continue improving in following CLs.
Change-Id: I89bae5afe0a7978aba9fe9bf7c8bf08fb59b1440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 01:37:34 +00:00
Konstantin Shcheglov
47ac03fad6
Break cycles in type parameters during linking.
...
Change-Id: Ibb31d2e1e4ea61451c6fff6c248938a7df333dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155061
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-20 23:49:39 +00:00
Konstantin Shcheglov
72defd5dcb
Extract WithNullSafetyMixin into its own file.
...
R=brianwilkerson@google.com
Change-Id: Ibf7c98288c8367590ceaf1c3200f21c9622746f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-20 20:59:39 +00:00
Konstantin Shcheglov
f4c3c31530
Fix new hints in analyzer.
...
Change-Id: I6bba1448a522355dff14ff8ac81b2568e4dcbfe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-20 16:26:02 +00:00
Sam Rawlins
bbe6bb9823
Analyzer: Improve generator return error messages
...
Fixes https://github.com/dart-lang/sdk/issues/27468
In addition convert both ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE and
ILLEGAL_SYNC_GENERATOR_RETURN_TYPE to CompileTimeErrorCodes.
Change-Id: I5f09f3d77dad52b4ba524c86b3e07ac5fac905fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-18 15:28:06 +00:00
Sam Rawlins
d90daf9154
Analyzer: Report unused optional parameters of private functions
...
Fixes https://github.com/dart-lang/sdk/issues/29731
This change produces UNUSED_ELEMENT hints for optional parameters
for which no arguments are ever explicitly given, under the following
circumstances:
* parameter is for a constructor, method, or top-level function which
is not accessible outside the library,
* function is never torn-off (all bets are off once its been torn off),
* method does not override a method in which the matching parameter is
required,
* method does not override a method with a matching paramter, in which
an argument is given for the matching parameter.
Change-Id: Idabf051f55140b62a440dc63ca0234f22598a5e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152730
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-17 19:30:27 +00:00
Brian Wilkerson
174759cfbd
Add a way to get all of the lint codes used by a rule
...
Several of the lint rules have been producing diagnostics with more than
one lint code, but the code that deserializes diagnostics has only been
able to use one of the codes. That potentially leads to errors, though I
suspect the bug has been invisible because we serialize and deserialize
the messages. Nevertheless, it seems like we ought to do this correctly
and that it will eventually lead to a visible bug.
Change-Id: I41faaa45df63cb3c74042661e1c89e3fde3d72d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154843
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-17 18:39:37 +00:00
Konstantin Shcheglov
7d3252800b
Infer void return type for FunctionExpression.
...
https://github.com/dart-lang/language/pull/1092
Bug: https://github.com/dart-lang/sdk/issues/42720
Change-Id: I7ce44a066382c63e22debbcb652a717b5230b267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 16:03:00 +00:00
Sam Rawlins
907da64b02
Analyzer: Redefine NOT_INSTANTIATED_BOUND to be an error.
...
All StrongModeCodes are being redefined.
https://github.com/dart-lang/sdk/issues/33545
Change-Id: I247c6584eba386edfd7babecb08adf5ccc9344ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154748
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 13:42:58 +00:00
Konstantin Shcheglov
058fa167c8
Implement LibraryScope as an adapter for the new scope.
...
Change-Id: Ic69dcec3b7b4263b13909b61dba49b1814116759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154640
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-17 02:35:54 +00:00
Konstantin Shcheglov
205e8ed056
Fix FeatureSetProvider on Windows.
...
Change-Id: Ie7a878869570cb7b1f0497c0688c17cb9f221933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154747
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-16 22:42:34 +00:00
Paul Berry
20e1864133
Allow abstract instance variables in NNBD code.
...
This is a step toward implementing
https://github.com/dart-lang/language/blob/master/accepted/future-releases/abstract-external-fields/feature-specification.md .
Change-Id: I3c5704b66a171f91589d122d0efe68ed0b9d40ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154740
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-16 22:02:54 +00:00
Mike Fairhurst
34069eeb10
[analyzer] Fix InterpolationString contentsOffset contentsEnd
...
Fix relating to https://github.com/dart-lang/sdk/issues/42634 , the
incorrect offsets from not tracking first/last properly meant the linter
was using custom logic here:
https://github.com/dart-lang/linter/blob/master/lib/src/rules/unnecessary_string_escapes.dart#L77
but that logic doesn't properly handle unclosed quotes, later producing
range errors in that case.
Landing this will allow me to switch the linter over to this code which
does handle unclosed quotes correctly (for the most part, see the
failing test, that won't cause crashes though), and fix this crash.
Change-Id: Ib58eddf99b6cf7b8b6bf5671fbfe7fbe9122713c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153700
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-16 20:39:04 +00:00
Konstantin Shcheglov
64deee143a
Search for packages using both URI and path.
...
Change-Id: I96c077514a03ce8472d205cc10f7b67af540e51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-16 19:09:24 +00:00
Paul Berry
5900c6b2b6
Change DartType.isBottom and TypeSystem.isBottom to match.
...
The old behavior was:
- DartType.isBottom returned true for `Never`, `Never*`, and `Never?`.
- TypeSystem.isBottom returned true for `Never`, `T extends B`, and `T
& B`, where B satisfies TypeSystem.isBottom.
The new behavior is:
- DartType.isBottom and TypeSystem.isBottom return true for `Never`,
`Never*`, `T extends B`, and `T & B`, where B satisfies
TypeSystem.isBottom. These are the types that are mutual subtypes
with `Never`, so it makes sense to treat them all as bottom types.
Change-Id: Iab762684f988025eae231652d43bfde3a0ffe3fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154625
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-16 17:52:23 +00:00
Konstantin Shcheglov
f0e54a6657
Deprecate Scope.lookup(), replace it with lookup2().
...
R=brianwilkerson@google.com
Change-Id: I14074500a4df6803ef362ac1d183bd595e85769f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-16 16:53:53 +00:00
Brian Wilkerson
9de49b536a
Fix an NPE in invalid-null-aware-operator-after-short-circuit
...
Change-Id: I91ebe5b4c511d74be566ce1f01ae0dba07313057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-16 15:57:03 +00:00
Johnni Winther
92f4eb58c8
[cfe] Support abstract fields
...
Only positive implementation, no error states are checked yet.
Change-Id: Iad79da1dd7e8be9229ee9d47c5301d39ebc3debc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154003
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-16 10:13:23 +00:00
Paul Berry
8cb7dfa70f
Modify parser to handle abstract fields.
...
There is no functional change to the analyzer or CFE yet; we simply
report the error in the parser listeners now rather than the parser
itself. In follow up CLs when we add full support for the feature, we
will want to keep the error reporting logic, but only report the
errors in pre-NNBD code.
Change-Id: Ifd14dd97d7d1d57586a8e14a25103356d54f0ea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154364
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-07-15 22:48:01 +00:00
Brian Wilkerson
d4ac7066b7
Improve diagnostic message when short circuiting (issue 42599)
...
Change-Id: I456bc50792dfdb30c281578d0d54ffa9e2af6474
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-15 21:19:49 +00:00
Konstantin Shcheglov
ef147c0a95
Issue 42699. Stop reporting EXPORT_DUPLICATED_LIBRARY_NAMED and IMPORT_DUPLICATED_LIBRARY_NAMED.
...
Bug: https://github.com/dart-lang/sdk/issues/42699
Change-Id: Ie64405791f15a38f170206a11eabee176b6cbfad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-15 21:03:16 +00:00
Konstantin Shcheglov
0f14f0e71f
Verify the index of IndexExpression with both read and write elements.
...
Change-Id: Ie680d47c04469d0289b71026a5826a4cd3701ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-15 17:21:54 +00:00
Sam Rawlins
2fcdfbbd6c
Analyzer: Add unused_element tests for ??= and += existing behavior
...
Bug: https://github.com/dart-lang/sdk/issues/42668 and
Change-Id: Ic6f7b513d8c938be4dc60b9d154e532bad754d58
https://github.com/dart-lang/sdk/issues/27705
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-15 17:13:44 +00:00
Sam Rawlins
a48bebea1e
Analyzer: Move tests for 7 more codes to diagnostics/
...
Change-Id: I1b646cff5bbc05538825434ce933e87e7ca075bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154365
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-15 12:22:13 +00:00
Konstantin Shcheglov
c3655ed435
Remove FolderBasedDartSdk.defaultSdkDirectory() and getSdkProperty().
...
It is up to the higher level clients to decide how to find SDK.
It is not API, and is not referenced internally, so we can land it
without going through breaking changes.
Change-Id: Id428519fa9bb3c38368f095c0f358e07f65c45b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-14 18:09:30 +00:00
Konstantin Shcheglov
8608726100
Stop supporting 'target?.[index]' and QUESTION_PERIOD_OPEN_SQUARE_BRACKET.
...
Change-Id: Icac4f851fbb9f283ce28ba8753c1b2e27a99cff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-14 14:36:19 +00:00
Sam Rawlins
450d611068
analyzer: Move tests for 9 codes to diagnostics/
...
Change-Id: Ib933f7923a0eb08db80839bf0490adc22d38ef14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154303
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-14 04:32:33 +00:00
Konstantin Shcheglov
388c983495
Add higher level non-API for angular_analyzer_plugin.
...
Change-Id: I7eb5a3c7e90b9d86c296dafc95b9f9c750c0095a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-13 15:44:59 +00:00
Sam Rawlins
39f39c04b8
analyzer: move tests for 4 codes to diagnostics/
...
Change-Id: Ida28ae6ef39314b724932c5ae1a9a3aa4a72a17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154220
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-13 14:55:15 +00:00
Konstantin Shcheglov
eb38d2a03b
Add PrefixElement.scope to API.
...
Change-Id: Ie673f521301d6ddc1b40d86ef7c02544f07e53fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-12 17:11:14 +00:00
Sam Rawlins
8e69e0d810
Analyzer: Move tests for 10 codes to diagnostics/
...
Change-Id: I331ca61293620d7c5d0b0d3e41387c10a22c6663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154143
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-11 21:50:13 +00:00
Konstantin Shcheglov
93fa1cf17d
Add Scope and LibraryElement.scope to API.
...
Change-Id: I5cfda9ed6c52fde38252d82ee1bc9c9152b906f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-11 06:20:42 +00:00
Sam Rawlins
6d06476bae
Analyzer: Report generators with void return types.
...
Fixes https://github.com/dart-lang/sdk/issues/32192
This has been illegal for some time. This change updates the analyzer
to match the behavior of CFE.
Also move the relevant tests to diagnostics/
Change-Id: I4539aeb65708e2594c52288a6b4584ba7e5455e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153066
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-11 03:02:42 +00:00
Brian Wilkerson
082a6e03bd
Use element kind to boost the relevance of available declarations
...
This doesn't significantly improve the overall scores, but it does cause
the element kind to be used for available declarations, which means that
constructors are suggested before classes.
Change-Id: I75e7bb13bd867b9209a43c4d737c5079c42eb25a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154080
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-07-10 20:08:36 +00:00
Sam Rawlins
6e687d1d74
analyzer: move tests to 4 new test files in diagnostics/
...
Change-Id: Ied68dc6a383c7ca0a44dbcd8381f3a94832d44fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153903
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-10 17:24:05 +00:00
Konstantin Shcheglov
e52a8beb6b
Report error for generators with return type void.
...
Bug: https://github.com/dart-lang/sdk/issues/32192
Change-Id: Ib31205207def253dc89802898a899b3555ecc28d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153953
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-10 15:09:29 +00:00
Paul Berry
9f8aaf65c7
Issue an error if a prefix in a type name is shadowed by a local variable.
...
See #42620 .
Change-Id: Ifd18c939082935390df0c2aa0bd724cf6f76c27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153705
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-09 23:09:18 +00:00
Konstantin Shcheglov
dfdc7e45c5
Report PRIVATE_SETTER.
...
Change-Id: I823582328b4b9cc63ac734e9ea1c9354175a6e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-09 21:51:50 +00:00
Konstantin Shcheglov
39c94735a3
Report MIXINS_SUPER_CLASS.
...
Bug: https://github.com/dart-lang/sdk/issues/42256
Change-Id: I49c70d5a172062fed4d8663d95701ba855effda6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-09 19:05:52 +00:00
Konstantin Shcheglov
849cdb2ab4
Check for consistency of language version overrides between library and parts.
...
Change-Id: I209cbcda3d96c4e2f1f7a0352b563c886a22e687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-09 00:42:42 +00:00
Konstantin Shcheglov
c76fc431c7
Add WorkspacePackage to each FileState.
...
We need this so that we can look if the file is NullSafe by asking
the package that contains it.
Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: I11c71faf7bddd53b458a66f0786454ecd7453b5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153521
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-08 23:54:47 +00:00
Konstantin Shcheglov
f2cbec8010
Check for unnecessary_parenthesis in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I2e8af156a190b51741d60fdb0217101c15306a79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-08 21:46:16 +00:00
Paul Berry
464641f51a
Extend BaselPackageUriResolver to handle files outside of lib.
...
Generated files can exist outside of `lib`. In a Bazel workspace
these are referred to using `file:` URIs that point to the generated
code directory. We need to be able to resolve references both from
the generated code to non-generated code and vice versa.
This is blocking the use of the migration tool in Bazel workspaces,
since the migration tool doesn't have the same level of error recovery
as the rest of the analyzer, so it needs to be able to resolve all
files including generated ones. But it should also improve the user
experience for using the analysis server in general in Bazel
workspaces, by reducing the number of nuisance "URI not resolved"
errors.
Change-Id: I38dababd29f4490746cc6e1eeede9f438526a815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-08 01:49:40 +00:00
Konstantin Shcheglov
eada9fa426
Issue 42605. Do LEGACY_ERASURE when checking inferred mixin type arguments.
...
Bug: https://github.com/dart-lang/sdk/issues/42605
Change-Id: I58d27352e770ce63fabc0da2c07920dbadb8af11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-08 00:09:24 +00:00
Konstantin Shcheglov
fea5f5866e
Add DartTypeVisitor and DartType.accept(DartTypeVisitor) to API.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/40478
Change-Id: I8453011f4a39323bda86244a749509b4b347b4b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-07 20:13:10 +00:00