Commit Graph

7128 Commits

Author SHA1 Message Date
Konstantin Shcheglov f7dc2d29de Issue 45195. Report MIXIN_INHERITS_FROM_NOT_OBJECT for class aliases.
Bug: https://github.com/dart-lang/sdk/issues/45195
Change-Id: I4b1e60a672b49c3c9fda92b3eac59c256eea13da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 20:48:43 +00:00
Konstantin Shcheglov ec7d39293d Revert "Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations."
This reverts commit 14b07bc81c.

Reason for revert: b/182098851 - does not break anyone, but has the same issue with runtime type vs. static type.

Original change's description:
> Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations.
>
> Change-Id: I12a663d6e2ed3288bf3535e019224041ae1a5093
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189600
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I112ecd13e77a9b420c5bc27905e29d728acfab89
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 19:41:34 +00:00
Konstantin Shcheglov 19e0673582 Revert "Return List<XyzElementImpl> from ElementImpl getters."
This reverts commit 645035bbb9.

Reason for revert: b/182098851

Original change's description:
> Return List<XyzElementImpl> from ElementImpl getters.
>
> Change-Id: Ice8a0feb6a0bd2599fcfd5ccc35c0b4242ed9530
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189620
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I33eff159d62813c35e7e00eee5b7d9dd4fb4e563
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 19:09:44 +00:00
Sam Rawlins 7ee3f73a9a Analyzer: Allow generic function types as type arguments and bounds
Bug: https://github.com/dart-lang/sdk/issues/44929
Change-Id: I9c83a9abd47ec6b3d59c118493c838632fc3182a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185305
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 18:32:31 +00:00
Konstantin Shcheglov 5794e716ab Make AnalysisSession.getErrors() non-nullable.
Change-Id: Ib5971e4c7327d96bf7a08b576b487833615d4ae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189622
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-08 08:38:51 +00:00
Konstantin Shcheglov 1601f6fcd2 Remove ResolutionCopier.
It is not used.

Change-Id: Ic18e29c0f47e313a55d7b4cc3d8e4bf32182f883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189621
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-08 08:32:41 +00:00
Konstantin Shcheglov 645035bbb9 Return List<XyzElementImpl> from ElementImpl getters.
Change-Id: Ice8a0feb6a0bd2599fcfd5ccc35c0b4242ed9530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 07:00:40 +00:00
Konstantin Shcheglov 14b07bc81c Replace NodeListImpl<Xyz> with NodeListImpl<XyzImpl> in implementations.
Change-Id: I12a663d6e2ed3288bf3535e019224041ae1a5093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-08 06:58:10 +00:00
Konstantin Shcheglov 75308fc26b Return Impl nodes from AstFactoryImpl and AstTestFactory.
Change-Id: I5d3f6eb8d07145079560c6f8820aa15e2f8183a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-07 23:24:10 +00:00
Konstantin Shcheglov 0506b1b2d3 Deprecate setters in API of AST.
Change-Id: Ib2ec164ef87b3a5a4bf028d592552e37451abd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-07 21:48:50 +00:00
Konstantin Shcheglov 53c8eda967 Keep more specific types for AnalysisContextCollectionImpl to avoid downcasts.
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.

Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-06 06:23:25 +00:00
Konstantin Shcheglov 3f5694c827 Issue 45141. Check for loadLibrary() using namespace.
Bug: https://github.com/dart-lang/sdk/issues/45141
Change-Id: Ifb0825d66a560d0136873942f9666d3dc630b6c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-05 22:21:54 +00:00
Konstantin Shcheglov 10a0c238ce Discover default analysis options files in ContextLocatorImpl.
Change-Id: Idbcb43ab53878b677c3195d3003eb9da6eda5bab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-05 06:30:17 +00:00
Konstantin Shcheglov 73b1cc26d4 Fixes for ContextRootTest and ContextLocatorImplTest on Windows.
Change-Id: I234ab250dd140df3da23015edd2295d0affbc67a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 20:46:49 +00:00
Konstantin Shcheglov 4cb71ce5cb Update analysis options before creating AnalysisDriver.
Change-Id: If9c337fc69ac11a570da5165edb17a3c4c75f418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 19:18:19 +00:00
Konstantin Shcheglov e6dbabd477 Issue 45161. Ignore YAML parsing exceptions in analysis_options.yaml
Bug: https://github.com/dart-lang/sdk/issues/45161
Change-Id: I14169cdb0f39e95612a21266cc7e6cf72141e2d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188960
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-04 01:38:15 +00:00
Konstantin Shcheglov 034fab2046 Skip symbolic link tests on Windows.
We need at least Windows 10, after 2016 to support it.

Change-Id: I1f1a3df95f70b770d434343bf5f66ba9ab33c6a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-03 22:21:24 +00:00
Konstantin Shcheglov 7d67f3ee5c Rewrite analyzer_cli batch mode using AnalysisContextCollection.
Change-Id: I0765df20f24ebf37b49a8a622a072e4d67f74845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-03 19:30:24 +00:00
Konstantin Shcheglov a4529db02b Explicitly analyzed directories and files are analyzed even if excluded by globs.
Change-Id: I6640f372d8494498facb5ad68bb8bf703aeb0e58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-02 17:29:04 +00:00
Konstantin Shcheglov 4128d005b7 Remove migration hints from analyzer/.
Change-Id: I9d3f529b8a2ae7e78dfdd913e8b79cb1a39c891c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-02 17:23:02 +00:00
Konstantin Shcheglov 3268bd0429 Fix for infinite loop in _isExcluded() on Windows.
Bug: https://github.com/flutter/flutter/issues/76911
Change-Id: I7115bcfec7ed736e12ca0c01739bf1738c4ceab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-27 20:54:28 +00:00
Samuel Rawlins 7aa8d96462 Revert "Report unused system libraries with shadowed elements"
This reverts commit 4c018c7013.

Reason for revert: Breaking dart2js_unit_tests:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8854208023803884128/+/steps/dart2js_unit_tests/0/stdout



Original change's description:
> Report unused system libraries with shadowed elements
>
> Fixes https://github.com/dart-lang/sdk/issues/45028
>
> PR out for flutter: https://github.com/flutter/flutter/pull/76436
>
> Change-Id: I63b22934b6ba969ec1a8ea4d282b2e8770d8c207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186042
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I63987443d2a57dbd0a3d22fa433658476074bf5d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-26 20:18:39 +00:00
Sam Rawlins 4c018c7013 Report unused system libraries with shadowed elements
Fixes https://github.com/dart-lang/sdk/issues/45028

PR out for flutter: https://github.com/flutter/flutter/pull/76436

Change-Id: I63b22934b6ba969ec1a8ea4d282b2e8770d8c207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186042
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-02-26 17:33:27 +00:00
Konstantin Shcheglov 8833cbed7d Fix for ContextRoot.isAnalyzed() when the root is in a dot-folder.
Change-Id: I5f343aa9bdd24a76e0521ec63ac24bf2679ff42f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-26 00:41:28 +00:00
Konstantin Shcheglov bf4a65cb62 Cache resolved files in FileResolver.
Change-Id: I3df19bb31e962ff6666e3c677d696315f8e8d8e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187720
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 23:46:24 +00:00
Konstantin Shcheglov 721ecfd63a We don't have any language features with the version before 2.6, so 2.2.2 is not important anymore.
Change-Id: I01cd35e5eccd47ae0e1638e881fa3b84d5f0a102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 23:18:54 +00:00
Konstantin Shcheglov f4bf9288cf Rename newAnalysisOptionsYamlFile() and newDotPackagesFile()
Change-Id: I1d11d5c8a7e7fc4f965cd797471dc84a5572fe9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 20:12:46 +00:00
Konstantin Shcheglov 34bec2f1a5 Deprecate AnalysisDriver.contextRoot
Change-Id: I2dfb7f2f751e3c3ba7cdc11c94b9dfa5ddd35670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 19:35:11 +00:00
Konstantin Shcheglov d15cca43f2 Update ContextRoot to consider any resource in .name folder as excluded.
Change-Id: I815fdf641e102fcea883cb0eed479678f5e9fa2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 18:56:26 +00:00
Danny Tuppeny 526e191a57 [analyzer] Return isQualified=true for the name of a constructor
Fixes https://github.com/dart-lang/sdk/issues/45105.

Change-Id: Ic7878bd14e6b9b9ee522b5b7d91f25137ab6f31f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-25 17:00:41 +00:00
Konstantin Shcheglov d54c201932 Fix handling of circular links in ContextRootImpl and ContextLocatorImpl.
Change-Id: Ib1de5a9f6bbf13e72024ddae6c83d3a73dcf24a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 06:01:00 +00:00
Konstantin Shcheglov 8b1c6632c5 Move remaining of file_paths from ContextLocatorImpl.
Change-Id: I7f2362494af731657e59f1189d68790f71d0fc2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 06:00:40 +00:00
Konstantin Shcheglov a629b48fdc Remove file name constants from AnalysisEngine.
Change-Id: I3457973212e704a0fedee20db17956c017ec91ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 05:52:56 +00:00
Konstantin Shcheglov 925df4601b Fix API signature computation when 'static' token moves.
Change-Id: Ice82e8cd06bd4fc5634c9aa8f8e9828e3b79a696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-25 05:24:25 +00:00
Konstantin Shcheglov 4366ff1afd Tests and fixes for resolveSymbolicLinksSync()
Change-Id: Ic4266f4ad1f46e405e22986e3660a3889ec7016c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 21:02:04 +00:00
Sam Rawlins f32575e43a analyzer: stop mixing WithNullSafety into tests extending PubPackageResolutionTest
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I01aa8a5908b8a2f195859c4c9fd99e3127249e29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-24 17:41:44 +00:00
Daco Harkes d45fd0f9d5 [vm/ffi] Support inline arrays in Structs
Adds support for single dimension inline arrays in structs. Multi-
dimensional arrays will be supported in a future CL.

This CL adds:
- CFE static error checks for inline arrays.
- CFE transformations for inline arrays.
- VM consumption of inline array fields for NativeType.
- Test generator support for inline arrays + generated tests.

Previous CLs added support for inline arrays in:
- analyzer https://dart-review.googlesource.com/c/sdk/+/183684
  - updated in this CL to new API.
- ABI calculation https://dart-review.googlesource.com/c/sdk/+/183682

Closes: https://github.com/dart-lang/sdk/issues/35763

Open issue: https://github.com/dart-lang/sdk/issues/45101

CFE transformations are tested with expectation files:
TEST=pkg/front_end/testcases/(.*)/ffi_struct_inline_array.dart

Trampolines and CArray API are tested with end-to-end Dart tests:
TEST=tests/ffi(_2)/(.*)by_value(.*)test.dart
TEST=tests/ffi(_2)/inline_array_test.dart

Compile-time errors (both CFE and analyzer) are tested in:
TEST=tests/ffi(_2)/vmspecific_static_checks_test.dart

Change-Id: I014c0e4153f1b885638adce80de6ab3cac8e6bb2
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183640
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-02-24 13:02:45 +00:00
Konstantin Shcheglov ab31c14841 Fixes for MemoryResourceProvider Folder.exists/getChildren() and links.
Bug: https://github.com/dart-lang/sdk/issues/44501
Change-Id: I60a79474111e56ebece3d9df3fe9281f6e3fcc06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186800
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 06:48:29 +00:00
Sam Rawlins 242dd97125 analyzer: Combine non-function-typedef test classes with null-safety test classes
In each file, test cases were simply moved, and not changed at all. No test
cases are removed. None are added.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I7566602f53a234b34e3dc54176ac9b80139f444b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-24 03:45:27 +00:00
Sam Rawlins b485114c32 analyzer: update two test classes to use null safety
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I7db26be235d3911b6c88b199df874da1ee2d552e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186760
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-24 02:41:57 +00:00
Konstantin Shcheglov f1094d5c3a Use newPubspecYamlFile() to create pubspec.yaml files
Change-Id: I181a3f3f14810019731201bf43e27befa7bc5481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-22 21:32:00 +00:00
Sam Rawlins 1a1a199f40 analyzer: Fix ambiguous import test regarding system libraries
Bug: https://github.com/dart-lang/sdk/issues/45057
Change-Id: I693c4560e563d982937c8059c26c0cfcb5eef590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185981
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-22 20:50:49 +00:00
Sam Rawlins f2c7a355c4 analyzer: Migrate four tests to use null safety; tidy up constant/evaluation_test
Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: Ic21b1f7ad03cf2049d1db672aa9e314da3dd3a49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-22 16:38:32 +00:00
Sam Rawlins eb448e3067 analyzer: Remove two TODOs regarding converting null-aware tests
The diagnostics referred to in these tests are not reported in null safe
code.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I59676e2c937e154a519649754b2cb196313a3dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-21 14:41:57 +00:00
Sam Rawlins 09fbc6562e Analyzer: convert two more test classes to use null safety
This was mostly converting star expectations to nullability-suffix-none.

There was a little bit of expected dynamic -> Object conversions,
and expected Null -> void conversions.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: Id064a398b8830a60552dfe57d3b5acc89f139eb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185723
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-19 20:43:54 +00:00
Sam Rawlins 02c72dda83 analyzer: migrate dart2_inference_test; move some tests out
All of the tests in dart2_inference_test work fine in null safety,
except a small handful. I moved these into more modern test locations,
and updated the tests to be simpler.

Much much much of the assignment tests were already covered in
assignment_test.dart. I just added a few test cases that did not have
the same coverage.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: I144ad4aa7e839c47af0d24c3118ce7bd91eeca7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-19 17:32:14 +00:00
Konstantin Shcheglov 3bcae5219b Set FieldElementImpl for synthetic getter/setter in top-merge.
Saw it crashing on a co19/ test internally.

Change-Id: I02662ad27eed409df2cadb81502a54207182a104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185722
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-19 16:37:24 +00:00
Sam Rawlins b0471a2ced Analyzer: rearrange invalid_assignment tests for null safety
I started trying to move checker_tests out from that very old test
class into invalid_assignment, and it was overwhelming. I rolled back
most of the work and kept this part.

Bug: https://github.com/dart-lang/sdk/issues/44666
Change-Id: Ic41b562cf263b4dae271de2da0f2ec5a716d6dfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-02-19 14:32:08 +00:00
Konstantin Shcheglov 9bfd416c45 Add ContextRoot.workspace, deprecated AnalysisContext.workspace, support included excludes in ContextLocatorImpl
Change-Id: Iecd324ad45b926ca6b0626f8bea4f479409154e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185499
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-19 02:15:40 +00:00
Konstantin Shcheglov 9a30392588 Require Workspace for ContextBuilder.getAnalysisOption() and createSourceFactory()
Ideally we want to create Workspace only once, and pass it around.
I was not able to do this yet, because DAS ContextManager kind of
dynamically updates contexts and drivers. I expect to avoid this issue
by switching DAS soon to AnalysisContextCollection.

I will follow with a bigger CL that keeps Workspace in ContextRoot.

Change-Id: I3050ba65400e0e5aa73e6d5f8beae821db10a6ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185498
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-19 00:54:30 +00:00