Commit Graph

8489 Commits

Author SHA1 Message Date
Sam Rawlins f23f450e11 Analyzer: Move CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH to compile-time
Many of the tests were highly redundant. Subtyping has been
consolidated, so the tests don't need to cover a dozen different ways
to subtype a class.

Change-Id: I04448790d3a74690d0edb57f15146a6c3b8f2173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 00:34:29 +00:00
Konstantin Shcheglov 219107cca0 Report INVALID_ASSIGNMENT on the cascade target.
https://dart-review.googlesource.com/c/sdk/+/155380 has tests that
show that it is otherwise hard to specify where the offending
expression is.

Change-Id: I8cdbc3d974148d644b75889a8afd921a2a2716cd
Bug: https://github.com/dart-lang/sdk/issues/42865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156067
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 23:04:49 +00:00
Konstantin Shcheglov 0b4896ac94 Resolve invalid prefix.name TypeName(s) to dynamic.
Change-Id: If449fcb37c2a095d37d34ea7c068fa85edb112c9
Bug: https://github.com/dart-lang/sdk/issues/42877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-29 21:08:08 +00:00
Konstantin Shcheglov 86057443c4 Issue 42837. Use legacy erasure in LUB computation in opt-out libraries.
Bug: https://github.com/dart-lang/sdk/issues/42837
Change-Id: Id61e37404d6d2e8452daed2bbd730f32a8687ea6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-29 20:06:35 +00:00
Brian Wilkerson 58a6e3c478 Rewrite handling of ignore comments to use token structure rather than regex
This also captures the information needed for the hints we want to add
around duplicated, erroneous and unnecessary ignore comments.

Change-Id: Ibafa2a92a02cf8113c222680f4868c38166d94e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155847
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 15:18:08 +00:00
Brian Wilkerson 4a268b764c Support const subclasses of visitor classes (issue 42853)
Change-Id: Idee546d25a4cb96d790d966695c852c22f4c3392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 13:54:18 +00:00
jlcontreras 355cade14f Add experiment flag for Value Classes
Change-Id: I94b42676ed233c3d421ac41be1c74dd90c74501e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156005
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
2020-07-28 12:16:08 +00:00
Sam Rawlins de0848e7ea Analyzer: Move tests out of old test file into diagonstics.
* Add non_const_call_to_literal_constructor to test_all.
* Clean up non_const_call_to_literal_constructor to avoid unused variables.
* Update NON_CONST_MAP_AS_EXPRESSION_STATEMENT tests to be failing tests.

Change-Id: I1ca9e18372c7b5acc7b8670f81ed89ed0aa18825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155927
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-27 22:18:48 +00:00
Konstantin Shcheglov 7c7e931c14 Update reporting INCONSISTENT_LANGUAGE_VERSION_OVERRIDE on part directives.
Change-Id: I100260b19d07c6ff7d172e9c31d4f99281a17807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:45:15 +00:00
Konstantin Shcheglov 2195fe308b Don't create artificial PrefixedIdentifierImpl to check for ignored undefined.
Change-Id: I8ef06680b4d87ba017abeb5b3a70999eed25fca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:37 +00:00
Konstantin Shcheglov 8de8a1c226 Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
They are all errors now.

Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:15 +00:00
Sam Rawlins 1a829bbde0 Analyzer: Recategorize COULD_NOT_INFER as CompileTimeErrorCode
Change-Id: I2aec1fd6499fcbcc35e7cf9b765dd43559d3ef67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-26 22:27:39 +00:00
Konstantin Shcheglov ba92b78acd Move errors from StaticWarningCode to CompileTimeErrorCode.
Bug: https://github.com/dart-lang/sdk/issues/42821
Change-Id: I153c48d7a2e4a02026928e6203aacf8f2dc029ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-26 04:19:25 +00:00
Konstantin Shcheglov 0fcd35f653 Use Scope lookup directly in ReferenceResolver.
R=brianwilkerson@google.com

Change-Id: Ic066b9a6470b628e1663c10e452c299e850db6d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155845
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-25 22:16:17 +00:00
Konstantin Shcheglov 4de9f9f75a Sort error / hint codes.
As a preparation for https://github.com/dart-lang/sdk/issues/42821

R=brianwilkerson@google.com

Change-Id: If154956f12591a1665e497885e3c2868497e614f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155834
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-25 21:10:57 +00:00
Konstantin Shcheglov 8745cd5323 Use new Scope directly to simplify TypeNameResolver.
Change-Id: Ib3e78f2faca8a8cbdfb16d1a1bf5dc414cbf01ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155830
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 23:51:18 +00:00
Konstantin Shcheglov ac71a391a3 Add TypeSystemImpl.futureOrBase (), stop using iterable/mapForSetMapDisambiguation.
Change-Id: I44e2888751d4a60fd79468cd184d218f16279637
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 20:10:28 +00:00
Konstantin Shcheglov b61e229a6d Issue 41065. Remove unnecessary null workaround.
Bug: https://github.com/dart-lang/sdk/issues/41065
Change-Id: I328b334fbdf4d4c77453cca56ae0c42ae43e8ee3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 19:35:16 +00:00
Konstantin Shcheglov 9282f1b14a Fix for invalid implicit downcast in InterfaceType.allSupertypes.
R=brianwilkerson@google.com

Change-Id: Ic4480fbab8ea8da6e9e8bb03ad95af66b3622618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 19:33:15 +00:00
Sam Rawlins c65b444145 Analyzer: Move TOP_LEVEL_CYCLE to be a compile-time error
Also remove duplication with RECURSIVE_COMPILE_TIME_CONSTANT.

Also write some tests for TOP_LEVEL_CYCLE.

Change-Id: I33cb765236a83bd925f9f0c6e65ac9398761c699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 15:11:38 +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 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 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
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
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 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
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