Commit Graph

7128 Commits

Author SHA1 Message Date
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
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
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
Paul Berry 01bcfbdc88 External field support: also allow external static fields.
Change-Id: I32008de216d2840f7466176e45b96cab3da4edde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158140
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 19:40:19 +00:00
Paul Berry 490a4b65e2 External field support: suppress "uninitialized non-nullable field" errors.
External fields whose type is non-nullable 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
fields, making sure that the getters and setters they introduce are
properly resolved and that their types are properly respected by
inheritance checks.

Change-Id: I9b08727ab0d45d24801af3721e332c7ec21d08bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-11 19:32:12 +00:00
Konstantin Shcheglov ef8bca8f90 Fix AnalysisDriverCachingTest for windows.
R=brianwilkerson@google.com

Change-Id: Ifec1075ad9c891e0eb8332022be33273474235c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158105
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 18:19:19 +00:00
Konstantin Shcheglov aba88b6ed4 Migrate CheckerTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: If63881900ed720caa3290a2a63f92b2a82e8f874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158084
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 15:34:44 +00:00
Jens Johansen 4c0cab024e [parser] No longer support ?.[ syntax
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.

Fixes https://github.com/dart-lang/sdk/issues/42681

Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 08:09:59 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00
Konstantin Shcheglov 7e86900c65 Remove DriverResolutionTest.
R=brianwilkerson@google.com

Change-Id: I1ca6918da9a51d5650ba9b76a960d7a3348ba4b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158081
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:43:58 +00:00
Konstantin Shcheglov a8f1be78a5 Migrate SdkConstraintVerifierTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: I0d6fa9ccdfbb4f9156226af2884a5f9b14dea495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:24:25 +00:00
Konstantin Shcheglov e626e47ea9 Migrate SubtypeOfSealedClassTest and language version tests.
R=brianwilkerson@google.com

Change-Id: I573a6223fb58b2a412d0dcbf961739ecd9a7af82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 20:52:01 +00:00
Konstantin Shcheglov 287c796412 Migrate AnalysisDriverCachingTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: Iafcc25686d1eb70f638347ed4af06e09eb965cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 20:12:13 +00:00
Paul Berry 87f0d5d9dc Abstract field support: do not allow abstract fields to be late or static.
Although these error conditions are not reported by the parser, the
language grammar does not permit them, so from a customer perspective
they are parser errors.  Accordingly, they have been assigned
ParserErrorCodes and reported by the AstBuilder, as we do for other
similar errors.

Change-Id: I79d0ad1dcad518981b8b649c117df326279008f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:27:13 +00:00
Konstantin Shcheglov 8405d7c8e3 Remove dart2jsHint option, verifier, and tests.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I95b88940c862d463af03e85fcdf0f4bf81c2fbd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 19:19:43 +00:00
Konstantin Shcheglov 1af388c521 Move DEPRECATED_MEMBER_USE to AnalysisContextCollection.
Change-Id: I938891254b2bf3aae7d2c514a27a7ed49f95b775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157883
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 17:46:33 +00:00
Paul Berry 92315c4b2d Abstract field support: do not allow initializing abstract fields.
There are three ways to initialize a field, so we have to check for
three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer

Fixes #42981

Change-Id: Ifc32a28ffb62d60fd2171d4980e88da9eebcb481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-08 13:36:52 +00:00
Konstantin Shcheglov 0aa5b0f019 Files generated for other packages in PackageBuildWorkspace do not belong to the package.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1608caf8fb54187f8154dd1510841f46a247383f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:26:57 +00:00
Konstantin Shcheglov a08a357bdb Remove unused code from PackageBuildWorkspacePackageTest.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I3e6fc8c87671b60c5152f273b3ff6da96c71b103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:57:51 +00:00
Konstantin Shcheglov 8ce4d6d6bf Replace 'non_nullable' with 'null_safety' in BUILD files.
The flag was renamed since the original issue was open.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: Ie92d43d09d97386f3e61ad226c0a0c88287d2ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:51:14 +00:00
Konstantin Shcheglov 5bd3e5a63f Use PubPackageResolutionTest for diagnostics snippets.
Change-Id: I4fd0e38d0ab431f96056fba0819ddefefea72e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:45:07 +00:00
Konstantin Shcheglov 6a5030981c Remove ResourceProviderMixin.newFileWithBytes().
R=brianwilkerson@google.com

Change-Id: I741d75149c1ff7108a458f661eb583b3fd711ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:14:41 +00:00
Konstantin Shcheglov fdef50f096 Support for declared variables.
Declared variables cannot be configured using analysis_options.yaml,
so I put them into AnalysisContextCollectionImpl for now.

R=brianwilkerson@google.com

Change-Id: I2aaa3cfa94ad4a386f0be7d47acc979a89b69b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-07 03:33:39 +00:00
Paul Berry 8b2576fe66 Abstract field support: detect when a concrete implementation is missing.
This CL covers two cases: when an abstract field appears in a concrete
class (which we report as CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, just as
we do for abstract methods), and when a concrete class implements a
class with an abstract field, but fails to supply the necessary
concrete implementation(s) (which we report as
NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_*, just as we do for
abstract methods).

Change-Id: I94bdbafc4ed7b058d9b33b3774e79cb55393380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-07 00:18:09 +00:00
Paul Berry fc7b79e5a9 Make NNBD and non-NNBD versions of non_abstract_class_inherits_abstract_member_test.dart
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.

Change-Id: I2e1a77634aef0493d5e44edf88373deaa9acb6c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 23:33:59 +00:00
Konstantin Shcheglov c2379a800a Move more tests to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: Ic6c37d069323cc06c6ab630757625a7e0b072200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 22:30:39 +00:00
Paul Berry a7b11bd12a Make NNBD and non-NNBD versions of concrete_class_with_abstract_member_test.dart
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.

Change-Id: Ida714ce7e3136acfaf05d12fe287ec9e1de1258c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157472
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 20:25:27 +00:00
Konstantin Shcheglov c59246d8ad Support for dart_package(non_nullable) in BazelWorkspace.
Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: I927184d9065eb5c54790275a429927de8099a7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157474
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 19:37:12 +00:00
Paul Berry d2c3758cc5 Abstract field support: suppress "final not initialized" errors.
Abstract final fields 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 abstract
final fields, 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: I885f23ce7ca554ba8f48e932ba9d76e128ac0bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157520
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 18:59:52 +00:00
Paul Berry 90aedbac3b Don't forget to run tests in FinalNotInitializedWithNullSafetyTest.
These tests weren't being referenced in the test's main() function, so
they weren't being run.  Fortunately they pass :)

Change-Id: Ie04039e36bbcaea8d13973efb7fee19112407648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157467
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 18:59:52 +00:00
Paul Berry 8076c9efd7 Abstract field support: suppress "uninitialized non-nullable field" errors.
Abstract fields whose type is non-nullable 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 abstract
fields, making sure that the getters and setters they introduce are
properly resolved and that their types are properly respected by
inheritance checks.

Change-Id: I1fe7b6f40456d03533b85403ec6f428656820706
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157466
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 18:59:52 +00:00
Paul Berry 465246f4d3 Make NNBD and non-NNBD versions of undefined_setter_test.dart.
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.

Change-Id: Idb389a079f7405fe4adc51bafd715a3f31a9cc7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157465
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 15:40:40 +00:00
Paul Berry af6e60927c Make NNBD and non-NNBD versions of undefined_getter_test.dart.
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.

In the process, I discovered a flow analysis bug
(https://github.com/dart-lang/sdk/issues/42957), which I plan to fix
in a follow-up CL.  For now the test that provoked the bug is marked
as failing.

Change-Id: I0767d650cfaecb125b0cea27c0c7971d3112deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 14:28:19 +00:00
Paul Berry b5a3292260 Abstract field support: add a notion of abstract fields to the AST and element model.
In a follow-up CL I will update error reporting logic.

Change-Id: I6fd2916c24a531b1f41bd2872301ffec1fdb8722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 02:19:46 +00:00
Konstantin Shcheglov d15b04ad04 Switch resolution and many diagnostics tests to AnalysisContextCollection.
Change-Id: I869f61fc102717afb395bd07935ae5e82d46bc56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156983
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-05 21:28:09 +00:00
Konstantin Shcheglov 4ac540e21d Check the file digest when reading its content.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Id07652456bd659a37b66f21b052bcef12cbb1c57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-05 15:24:28 +00:00