Konstantin Shcheglov
514094b74b
Resolver annotations for each node directly.
...
Specifically, don't rely on climbing up from VariableDeclaration(s).
R=brianwilkerson@google.com
Change-Id: I70225ce0b55f9ee2b3405e8a678cc2c854b2af6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-20 21:23:39 +00:00
Konstantin Shcheglov
1c0a64ded5
Comments and renames in FlowAnalysisDataForTesting.
...
R=brianwilkerson@google.com
Change-Id: I75710e11b88bbed59e57bc1928f9e06bbd279c5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-20 17:14:29 +00:00
Konstantin Shcheglov
25edea3d8d
Issue 43100. Verify local variable reads for null safety.
...
Bug: https://github.com/dart-lang/sdk/issues/43100
Change-Id: Ia8ece4de32f65d7912e534ce61936a45f2c768c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-20 15:50:50 +00:00
Brian Wilkerson
d52a577f3b
Fix the correction message for late_local_final_already_assigned
...
Change-Id: I983c6e9a20020f148e16ec068c7edd8d698534ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-08-20 15:30:59 +00:00
Konstantin Shcheglov
39e4dfe571
Update experimental_features.yaml, set experimentalReleaseVersion for non-nullable.
...
Bug: https://github.com/dart-lang/sdk/issues/43032
Change-Id: I28b27b3416826abd807a185b2d4214782571fb98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159383
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2020-08-20 01:38:48 +00:00
Konstantin Shcheglov
32ae7d9efc
Switch tests for the new testing and remove ResolverTestCase.
...
R=brianwilkerson@google.com
Change-Id: I2bbf8a5194878389bca43d534bbf3bc116c5acbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-19 21:54:47 +00:00
Paul Berry
66501778e7
Run MethodInvocationResolutionTest cases in null safety mode.
...
Previously, MethodInvocationResolutionTest contained a bunch of useful
tests that should pass in both legacy and null-safety modes (with some
minor changes to expectations), but they were only run in legacy mode
(and a very small set of tests were run in null-safety mode). This CL
moves those tests to a mixin so that they get run in both modes.
This is necessary because in follow-up CLs I will be changing the type
analysis rules for method invocations in null safety mode (in
accordance with
https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/number-operation-typing.md ),
and I want to make sure not to lose test coverage.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I263d8422bc2d110dcc7954c7521bd084b7ea839e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159360
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-19 19:56:37 +00:00
Paul Berry
4280e0a819
Fix crash when a null shorting expression is null checked.
...
Postfix increments and decrements are null-shorting expressions
(e.g. `x?.y++.isEven` only calls `isEven` if `x` was non-null), but it
is still being decided whether postfix `!` should be null shorting
(i.e. whether `x?.y!` should fail if `x` is null). See
https://github.com/dart-lang/language/issues/1163 .
Previously, the analyzer was inconsistent about whether it considered
`!` to participate in null shorting; as a result, when analyzing an
expression like `x?.y!`, the analyzer would fail to call
`FlowAnalysis.nullAwareAccess_end`, resulting in corrupted flow
analysis state, which could lead to a crash.
This change makes the analyzer treat `!` as *not* participating in
null shorting, which is consistent with what is currently written in
the spec and implemented in the CFE.
Fixes #43093 .
Change-Id: Ie69c5c29f226fe1a0282d0e7a1e079778dc700c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159147
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-19 19:35:57 +00:00
Konstantin Shcheglov
2b7fc8f134
Update FeatureSet to the new rules.
...
Bug: https://github.com/dart-lang/sdk/issues/43032
Change-Id: I6c7d7dc56fd0d4edcc3c6f6cc6fb0422316b8f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159187
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-19 18:27:37 +00:00
pq
37c1da672c
element model support for @doNotStore
...
Change-Id: Ic69dcee22de76540d7034a0a9265cb22ea325b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159184
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-19 04:50:14 +00:00
Devon Carew
690d04e146
[analyzer] update a dignostic message to refernce the new name for NNBD
...
Change-Id: I6edf67f88005b7745b8c0f875e1ce333134f1a2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159146
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-19 04:42:11 +00:00
Konstantin Shcheglov
1c5a17b212
Don't refresh files when they are not notified as changed.
...
The refresh was causing "Cycle loading state error", so it is possible
that this CL will fix this long standing issue.
Bug: https://github.com/dart-lang/sdk/issues/43073
Change-Id: Id1eeacd01cf10e918b002d227c8942e38bed543c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-18 21:15:00 +00:00
Devon Carew
932712b602
update pubspec to reflect actual packages used
...
Change-Id: I02b10f92d858d0303f1a71e649395fb013f437aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-08-18 17:11:30 +00:00
Konstantin Shcheglov
a51f1747e0
Prepare to publish analyzer 0.40.0 and _fe_analyzer_shared 8.0.0.
...
Change-Id: I126207dcc47885565a3a6d7002ff15ad3cc493c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-18 15:12:10 +00:00
Paul Berry
5642366611
Null safe numbers: plumb element through to refineBinaryExpressionType.
...
The new rules for null-safe number promotion apply to both operators
and ordinary method calls, so I'll be implementing them in terms of
MethodElement.name rather than an operator TokenType. To make this
possible, we need to pass the method element to
TypeSystem.refineBinaryExpressionType.
I'm doing this as a separate CL from the main implementation so that I
can verify that it doesn't introduce backward compatibility issues.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I6be9086553ee0ea9994994c903880fe9bb4477fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-17 23:17:55 +00:00
Brian Wilkerson
819af72908
Use "receiver" rather than "target" in messages and docs
...
Change-Id: I08fdc928c72035a04dc2bb731ce8a2e95a81f9df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158803
Reviewed-by: Jaime Wren <jwren@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-08-17 23:11:35 +00:00
Paul Berry
314dc8de98
Run AssignmentDriverResolutionTest cases in null safety mode.
...
Previously, these tests ran only in legacy mode. This CL moves the
tests to a mixin so that they can be run in both modes.
This is necessary because in follow-up CLs I will be changing the type
analysis rules for binary expressions in null safety mode (in
accordance with
https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/number-operation-typing.md ),
and I want to make sure not to lose test coverage.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I44a443205e9b36c698b7c736b75f8701aed7f947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158600
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-17 16:08:39 +00:00
Jens Johansen
8bca93872a
[parser] Better error message for annotations on type arguments
...
This CL changes the message given in the situation identified in
https://github.com/dart-lang/sdk/issues/22314
Fixes https://github.com/dart-lang/sdk/issues/22314
Change-Id: Ibd47dd419d52673ae0d9e32039e0a635c1e09543
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158388
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-08-17 07:43:52 +00:00
Konstantin Shcheglov
d9ce879bc2
Track if location has access to this.
...
We will need this also to implement '16.35 Lexical Lookup' from the spec.
Change-Id: I3b77c4a016fd54771b07957d522074aeb8dd1938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-17 01:08:52 +00:00
Devon Carew
528238465f
Remove the PerformanceTag class and related code.
...
Change-Id: I55b39e8fa6de7a3a946333bc84cc4ba0a09ecba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-08-16 23:59:42 +00:00
Konstantin Shcheglov
332aa7d0c5
Add more data to debug already loaded library cycles.
...
R=brianwilkerson@google.com , devoncarew@google.com
Change-Id: I60122021faabf776f14034ef42ef08142ba6a5a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158760
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-16 01:25:21 +00:00
Konstantin Shcheglov
87027c97a1
Start rewriting AssignmentExpression resolution, local variables.
...
Also updates for tests when the left side is a SimpleIdentifier.
Change-Id: I8da1392e2aa8e11a323e09aa380fb49e8cbf38da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-15 01:09:00 +00:00
Konstantin Shcheglov
30b1c95a78
Add readElement, writeElement, referenceElement to SimpleIdentifier.
...
Just getters for now, not field, and not migrating existing getters
to them.
Change-Id: Id93c5988c606c45d0833aa7b3fbfefa507cbdb2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-14 19:00:24 +00:00
Paul Berry
8d12c07cce
Work around redundant hint with unnecessary null comparison.
...
This should fix analyzer bot failures triggered by
https://dart-review.googlesource.com/c/sdk/+/155926 .
Bug: https://github.com/dart-lang/sdk/issues/43051
Change-Id: Ie4650a72611c63798054b4f4aad9dfa7d76ad0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158486
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-14 17:53:38 +00:00
Paul Berry
27b6e1eaf6
Run BinaryExpressionResolutionTest cases in null safety mode.
...
Previously, BinaryExpressionResolutionTest contained a bunch of useful
tests that should pass in both legacy and null-safety modes, but they
were only run in legacy mode (and a very small set of tests were run
in null-safety mode). This CL moves those tests to a mixin so that
they get run in both modes.
This is necessary because in follow-up CLs I will be changing the type
analysis rules for binary expressions in null safety mode (in
accordance with
https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/number-operation-typing.md ),
and I want to make sure not to lose test coverage.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I3eac5fd563d7505abe2930835b14867bebec3512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158482
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-14 17:47:16 +00:00
Paul Berry
e403e6ae77
Flow analysis: rework handling of equality tests.
...
The new logic classifies the LHS and RHS of the equality check as
either null, non-nullable, or potentially nullable, and then either
promotes, treats the expression as equivalent to a boolean, or does
nothing, as appropriate.
This means, for example, that a comparison between a non-nullable
value and `null` is now known to evaluate to `true` for reachability
analysis.
Note: as part of this change, it was tempting to trigger promotion
whenever a varialbe is equality compared to an expression of type
`Null`, but this would be unsound (consider `(int? x) => x == (x =
null) ? true : x.isEven`). So we still only promote when the variable
is compared to a literal `null`.
Fixes #41985 .
There's a corresponding spec change out for review:
https://github.com/dart-lang/language/pull/1134
Change-Id: Id7f1d4eaa3b0fa57124445bb8352eef32c304feb
Bug: https://github.com/dart-lang/sdk/issues/41985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155926
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-08-14 12:16:36 +00:00
Konstantin Shcheglov
f3936bca67
Add Resource.provider
...
R=brianwilkerson@google.com
Change-Id: I1d41d46f927e0ca804031a6fdf8148825695636e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-14 01:49:45 +00:00
Konstantin Shcheglov
2790ce297d
Update assertSimpleIdentifier() to accept separate 'readElement' and 'writeElement'.
...
Not yet fully enforced, and probably not fully implemented currently.
R=brianwilkerson@google.com
Change-Id: Ibbb43506cf7abb4104d348077e2d5bafeb60ba0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158504
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-13 21:09:12 +00:00
Konstantin Shcheglov
302ad7ab2c
Replace isNonNullableByDefaultInternal flag in LibraryElementImpl with FeatureSet.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I4fdb464df5f70ae93ccff5f06d8c99d34d3f8e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158500
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-13 17:27:04 +00:00
Paul Berry
bf9ef579ad
Null-safe numbers: separate legacy and null-safe number promotion.
...
The new number promotion rules for null safety
(https://github.com/dart-lang/language/blob/master/accepted/future-releases/nnbd/number-operation-typing.md )
are different enough from the old ones that it makes sense to
implement them separately. As a first step toward that, this CL
separates the existing logic into legacy and null-safe variants.
Bug: https://github.com/dart-lang/sdk/issues/42629
Change-Id: I0d52ce7366e34d5e0d176a0e14f4bc55f5541c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158460
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-13 17:09:34 +00:00
Paul Berry
33849927c9
External variable support: test that local variables and parameters can't be external.
...
Change-Id: Ib7b24b59ab7f14197f57d4b632c8462c40140c50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158372
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-13 16:11:34 +00:00
Paul Berry
06aff09656
External/abstract field support: prohibit a field from being both external and abstract.
...
Change-Id: I8c4dd136dc8c6518fddda68cfcb360cea8386942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-13 16:11:34 +00:00
Konstantin Shcheglov
5623235652
Report HintCode.MISSING_REQUIRED_PARAM in legacy for null safety required parameters.
...
Bug: https://github.com/dart-lang/sdk/issues/43026
Change-Id: I1fcd08562bd7259bb09474cad44cf84b342a16fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158343
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-08-13 16:00:44 +00:00
Konstantin Shcheglov
aa867dbc89
Remove LibraryResolutionCapability and hasResolutionCapability().
...
R=brianwilkerson@google.com
Change-Id: I24503b37a925b9cb5fccb1a97307bc491e0c56f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158370
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-13 15:40:55 +00:00
Paul Berry
2412bc1643
Add a safety check to analyzer messages codegen.
...
Previously, if the user added an `index` field to a message but failed
to add an `analyzerCode` field, code generation would just silently
ignore the index. This was error prone. Changed to report
`invalidAnalyzerCode`, which is the same error we report if the
analyzer code is improperly formatted.
Change-Id: I37de06058cd1938af2c9ef506412dc7960986269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158402
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-13 15:25:54 +00:00
Jens Johansen
7e42cbf582
[parser] Change recovery of multiple extends with comma
...
E.g. class Foo extends Bar, Baz {} would before have parsed weirdly,
but it will parse as you'd (probably) expect with an error saying
you cannot do that. For now at least both CFE and Analyzer will
pretend like you just specified the first one but I suppose Analyzer
could for instance use the extra information to propose converting
other ones to implements clauses or similar.
Fixes https://github.com/dart-lang/sdk/issues/22313
Change-Id: I180cdd8ab07143dd74fd21c9976ec2a46c428d8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158261
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-08-13 08:49:53 +00:00
Paul Berry
a3b15aefca
External variable support: do not allow external variables to be late.
...
Although this error condition is not reported by the parser, the
language grammar does not it, so from a customer perspective it is a
parser error. Accordingly, it has been assigned a ParserErrorCode and
is reported by the AstBuilder, as we do for other similar errors.
Change-Id: I22aad9b0acd27bf6e60dfb393837d48a49fc336b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158365
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-13 03:53:38 +00:00
Paul Berry
ff987cc0ad
External variable support: do not allow initializing abstract fields/variables.
...
There are three ways to initialize a field/variable, so we have to
check for three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer
Change-Id: I14caa38aaf2265966a19c68525f1458ff9d116f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158363
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-13 02:42:38 +00:00
Konstantin Shcheglov
95d47368ec
Add LibraryElement.featureSet
...
This generalizes `LibraryElement.isNonNullableByDefault`.
I don't have yet plans to remove it though.
R=brianwilkerson@google.com
Change-Id: I6385a568f87e449c9c18e7d93802463567322bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158369
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-13 01:06:48 +00:00
Paul Berry
d851c8c4d3
External field support: test error conditions related to concrete implementations.
...
This CL contains tests to verify that external fields are not required
to have concrete implementations, but that they imply the need for
getters (and sometimes setters) in concrete subclasses.
Change-Id: I0fb6eca1bc8738a0742e4fc721d66d6b773e0b12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158203
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-12 23:37:58 +00:00
Paul Berry
a52eb87054
External variable/field support: suppress "final not initialized" errors.
...
External final fields and variables don't need to be initialized (in
fact they can't be initialized), so we shouldn't report "uninitialized
field" errors for them.
This CL also adds some basic tests of the functionality of external
final fields and variables, making sure they don't introduce setters,
and that the getters they introduce are properly resolved and that
their types are properly respected by inheritance checks.
Change-Id: Ic60042b22b0636b7316119b663629c1c6ced6e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 23:37:58 +00:00
Konstantin Shcheglov
aa74b824a8
Migrate tests for constant_update_2018 to mixins.
...
Overriding `analysisOptions` does nothing, we need to set the
language for the test package to test cases when the feature is
disabled.
R=brianwilkerson@google.com
Change-Id: Ie60bacef63ec2bad37b5e890d008dbee553c6dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 21:23:28 +00:00
Konstantin Shcheglov
833650aa45
Use package_config.json in tests.
...
R=brianwilkerson@google.com
Change-Id: I4488a285ae72b02e6771a36c8a44df3ea0c97393
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 19:05:06 +00:00
Paul Berry
967181b480
External variable support: also allow external top level variables.
...
Change-Id: Id0f8f15bbdc17ef92e7f4e16b6acc0c3f30e69d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158150
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-12 17:05:24 +00:00
Konstantin Shcheglov
5e3f13494c
Create new context roots for folders with .dart_tool/package_config.json files.
...
R=brianwilkerson@google.com
Change-Id: If1ad72a1debb7c16737df9ea2507a020fabdfcf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 16:38:15 +00:00
Konstantin Shcheglov
eb2d8e58f1
Remove unnecessary ErrorCode prefixes from unique names.
...
R=brianwilkerson@google.com
Change-Id: I58680bcdc79309596bf89a2e193a340456c73b47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 16:37:14 +00:00
Paul Berry
b7d139a626
External variable support: add a notion of external top level variables to the AST and element model.
...
In follow-up CLs I will update error reporting logic.
Change-Id: Iee42088beffee3915a2ef6a4c8cb5c1031535d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158149
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-08-12 15:59:24 +00:00
Konstantin Shcheglov
022812983e
Enforce uniqueness of ErrorCode.uniqueName
...
Remove duplicate ParserErrorCode(s).
R=brianwilkerson@google.com
Change-Id: I8c8e4e3433f7147a728888cf5735bbecbc8297c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158204
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-12 00:40:59 +00:00
Konstantin Shcheglov
2f031c7121
Report WRONG_NUMBER_OF_TYPE_ARGUMENTS_EXTENSION.
...
R=brianwilkerson@google.com
Change-Id: I4c56a4535c4ae26dec9aaae9791774ad3ace365c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-11 21:54:10 +00:00
Konstantin Shcheglov
c4f3bfb5cb
Rename PackagesContent to MockPackages.
...
We have MockPackages in DAS, although implementation is quite
different. At some point we might want to unify them. But for now
just name it similarly.
R=brianwilkerson@google.com
Change-Id: Id4bb2b16b845368d99260200f1172562362a8beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-08-11 20:33:59 +00:00