Konstantin Shcheglov
c2d28d1569
Rename Null Safety tests.
...
R=brianwilkerson@google.com
Change-Id: I9276244cab52cb5c0f2687052f2a3df9a9fd48b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 00:26:08 +00:00
Konstantin Shcheglov
4d3ec06277
Add more data and performance operations for Cider.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: If2ad5135a8de977f92300e6c2480891ab02c6458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155721
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 00:25:56 +00:00
Konstantin Shcheglov
3103d859e4
Remove unused TypeSystemImpl.mostSpecificTypeArgument().
...
R=brianwilkerson@google.com
Change-Id: Ie9adba08c0f5e35e01db680ec3dce078791a9918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-24 00:25:13 +00:00
Konstantin Shcheglov
6d9a4f16dd
Issue 42757. Implement null spread element typing with null-safety.
...
Bug: https://github.com/dart-lang/sdk/issues/42757
Change-Id: I6c0080402d8eb13aef8097ecf70025736002c3d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 22:36:48 +00:00
Konstantin Shcheglov
8c316a99de
Remove unnecessary null checks.
...
R=brianwilkerson@google.com
Change-Id: Ic88659225aeff8dba8b4050938da704c23583b38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 22:36:03 +00:00
Sam Rawlins
6c9b885e57
Remove StrongModeCode.INVALID_PARAMETER_DECLARATION; it's redundant
...
You can see in the included test that we already report
`FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE`.
Change-Id: Ib7c4177627120a31910d3929d61f5337cb869b1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-23 20:30:50 +00:00
Sam Rawlins
8796382840
Analyzer: Move invalid_super_invocation to compile-time error
...
Change-Id: Id8be8473b2516cfc15c226edaaf25dadf3a90d3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155549
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 18:15:04 +00:00
Konstantin Shcheglov
cece303eb4
Check diagnostics in List/Map/SetLiteralTest(s).
...
We usually check for errors in resolution tests.
Here we have more diagnostings than usually, but it still seems right
to check and don't hide it.
R=brianwilkerson@google.com
Change-Id: I27ca020f2be34d4e5483e2c0f2a216f75ff5bc43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 16:38:03 +00:00
Konstantin Shcheglov
cc519b9a03
Test that during partial resolution for Cider we don't resolve some nodes.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I7212016394b7e2027b47ba8dec47b94961dccb5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155546
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2020-07-23 16:21:00 +00:00
Konstantin Shcheglov
58b6f40c73
Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
...
Initial: https://dart-review.googlesource.com/c/sdk/+/155500
Reverted: https://dart-review.googlesource.com/c/sdk/+/155540
Bug: https://github.com/dart-lang/sdk/issues/42797
Change-Id: I5f0f1df594ac678718f347ee80b1764f971e42e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-23 00:01:12 +00:00
Konstantin Shcheglov
8c664d4f3f
Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
...
This reverts commit 6bba75079a .
Reason for revert: Starts reporting new hints in front-end libraries. Breaks bots. Will clean-up and reland.
Original change's description:
> Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
>
> R=brianwilkerson@google.com
>
> Bug: https://github.com/dart-lang/sdk/issues/42797
> Change-Id: I14e50c231935a4025d33762843f5a54a1ee2154c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155500
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: I99e845d9bd1d9c0882fecc8d72d18d5582454461
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/42797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-22 20:56:51 +00:00
Konstantin Shcheglov
5171534e81
Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
...
Change-Id: Iac395adf15c3f636e3e7e7241e0573f83ab61372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 19:15:59 +00:00
Konstantin Shcheglov
6bba75079a
Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
...
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/42797
Change-Id: I14e50c231935a4025d33762843f5a54a1ee2154c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 19:13:57 +00:00
William Hesse
24c7666def
Update tests that have the current version number hardcoded
...
Some package configuration tests have the current version hardcoded
in local package_config.json files. Update these from 2.9 to 2.10.
Change-Id: I77bf63c0e5dfa73aa8a86fb1b4e8a404e8cfaa7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155441
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-07-22 13:22:07 +00:00
William Hesse
f88ce7aef5
Increase Dart version to 2.10
...
Change-Id: Ic6b556f935602834564aca24690608aa624efa43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155440
Reviewed-by: Martin Kustermann <kustermann@google.com >
2020-07-22 13:22:07 +00:00
Konstantin Shcheglov
6f8ce20c99
Move asInstanceOf(ClassElement) to DartType.
...
This follows to the change to the specification.
https://github.com/dart-lang/language/pull/1106
R=brianwilkerson@google.com
Change-Id: I6575f201161c454de98e9bcbec74b9974d91d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155242
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-22 01:22:05 +00:00
Sam Rawlins
041e0dd618
Analyzer: Enforce strict-inference
...
Change-Id: Iba49bfa7cf10f8a3b1d3be03e73fdca280f0940a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155062
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-07-22 00:44:55 +00:00
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
Paul Berry
eae54cf02c
Fix reachability logic for expression types.
...
Previously, we considered an expression unreachable if its type was
exactly `Never`. This CL switches to using TypeSystem.isBottom, which
correctly handles types like `T extends Never`.
Change-Id: Ia6ce580caab6bc7ce7cceb1d0097b50f1da88f8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154746
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-21 18:56:25 +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
284ba97259
Call getFileContext() once for Cider completion.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: If6332ad5a7a3153e7bc67376294df9bbb2468ce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2020-07-21 17:07:02 +00:00
Konstantin Shcheglov
db6a783a17
Remove checks for not-null in ScopedVisitor.
...
R=brianwilkerson@google.com
Change-Id: I297b03f9cc9c1683767549150a90568c80f42551
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-21 16:53:32 +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
01294566d4
Prepare to publish analyzer 0.39.14 and _fe_analyzer_shared 6.0.0.
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: I6f5e92ab29f757294a18dfff17c14745999bfa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155065
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-21 00:51:14 +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
3dd79c8478
Don't make sdkPath required yet in implementations.
...
It would be a breaking change.
https://github.com/dart-lang/pub/issues/2563#issuecomment-660942717
Change-Id: Ia2b75b5ed863753629340e6d2a4e273adc84bad2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155001
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-07-20 18:54:23 +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
Paul Berry
ded9b3ce3f
Flow analysis: consider promotion to Never to be unreachable.
...
Fixes #41981 .
Bug: https://github.com/dart-lang/sdk/issues/41981
Change-Id: Id2ce176c703cb3346d4bd7471b10ecac9e3b9907
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154624
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-07-20 16:17:57 +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
ec01fc2bf1
Remove ResolutionContextBuilder.
...
This class is not API, and is not used internally.
So, we can just remove it.
R=brianwilkerson@google.com
Change-Id: I3c0d8aac22de8276758dae9ac23b9f1e23e660bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 17:27:26 +00:00
Konstantin Shcheglov
a391b0e775
Fix analyzer Windows bots.
...
Change-Id: I8afe2b5dcc7a3b4a4aefc543811df6b542d15d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 16:24:50 +00:00
Konstantin Shcheglov
dba9f7f99c
Put isXyz flags into ParameterKind and use in AST and element model.
...
Change-Id: I15d2bb6144bb266d8cd527c5342679cc8c6243c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 16:05:10 +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
9d507c84f3
Replace 'bottom' with LinkedNodeTypeKind.never
...
Change-Id: I382ae9e4c683357a0c3855d47bf9aaa1912d6aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-07-17 00:00:44 +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
Sam Rawlins
cceb368fa6
Analyzer: Remove _TopLevelInitializerValidator.flagTopLevel
...
The task model is gone, so this is not needed. Some of the codes should
not be reported any more, but that is a larger effort, partially
orthogonal.
https://github.com/dart-lang/sdk/issues/33545
Change-Id: I8e5955df33fecefcd6efc926fe69d69dd1b98f51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154745
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-16 21:47:34 +00:00
Sam Rawlins
f58ef23d58
Analyzer: Remove unused DYNAMIC_INVOKE code
...
This code is never reported.
Change-Id: I452e75682c188b4d89e8415f1f4050b2765cd267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154744
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-07-16 21:46:04 +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