pq
60bec731a0
@doNoStore fixes for function expressions
...
Fixes: https://github.com/dart-lang/sdk/issues/44425
Change-Id: I5bac77d9a2961750b0037cd1d464ae059bcbe886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2020-12-08 21:01:55 +00:00
Danny Tuppeny
0fa6674ea9
[Analyzer] Include required-named params in defaultArgumentListString and LSP complete-function-calls
...
Change-Id: I8b4c09305df6e868e7447c538be4a3b540aa7e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174802
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-08 20:47:04 +00:00
Konstantin Shcheglov
dbe003f6af
Update AstRewriter to support non-function type aliases.
...
R=brianwilkerson@google.com
Change-Id: Id2bca0b3c8603fceea18628286412fea5a4598de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-08 20:46:25 +00:00
Konstantin Shcheglov
1c864b1bc7
Fix for StackOverflow in FileState.library
...
Change-Id: I6dd9ceefbfa8d5f457d69ae20838290b8a208c98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175329
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-08 17:26:54 +00:00
Konstantin Shcheglov
8d01debeda
For interactive use case in AnalysisDriver use separately stored ASTs for files.
...
Change-Id: I92ee458a6c143a3164c0b5a10adf42c4dbe4878d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-08 00:58:18 +00:00
Konstantin Shcheglov
9b128c5173
Build only null safe SDK bundle for resynthesize tests.
...
We don't have legacy SDK anymore.
R=brianwilkerson@google.com
Change-Id: Ib122afd953d7f1167c98125dce582713fd6f7a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-07 21:35:48 +00:00
Konstantin Shcheglov
ded707e265
Update latestSdkLanguageVersion to '2.12'.
...
Change-Id: I4b06f02dfecf9e10bca7fb0b285527c80d76166e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-07 18:40:54 +00:00
Konstantin Shcheglov
1231658f99
Add 'redirectedConstructor' to unit API signature.
...
ConstructorElement.redirectedConstructor exposes this data, so we
should include it into the signature.
Change-Id: I87d339589694b63709f722f6b5242fb95c1085d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175220
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-07 17:28:58 +00:00
Lasse R.H. Nielsen
6e29700e16
Update List constructor documentation, deprecate constructor.
...
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
2020-12-07 16:20:28 +00:00
Brian Wilkerson
7316f346e3
Update the highlighting for private_optional_parameter to include only the parameter name
...
Change-Id: Ie04c30d4d3db7aa9f6804097c8a5a0fd78854756
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175200
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-12-07 15:28:37 +00:00
Sam Rawlins
56cf16887c
Analyzer: Don't report on prefixed import with illegal references
...
Bug: TODO from https://github.com/dart-lang/sdk/issues/38784
Change-Id: I4ecdaf333c2613eb5fa0c57e4a8f8be56c35bb21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175184
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-07 01:27:25 +00:00
Sam Rawlins
3f8ce51efd
Analyzer: Do not report unused prefixed import when extension is used
...
Fixes https://github.com/dart-lang/sdk/issues/40298
Change-Id: I2fb70249749b3bb086470714e5d1e16e80c30811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-12-06 19:36:44 +00:00
Konstantin Shcheglov
c9854e3453
Flow analysis is not available outside of function bodies and initializers.
...
This fixes a group of crashes during fuzz testing.
FAILURE: z({=?[
[NoSuchMethodError: The getter 'flow' was called on null.
Receiver: null
Tried calling: flow
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 ResolverVisitor.startNullAwareIndexExpression (package:analyzer/src/generated/resolver.dart:743:21)
#2 ResolverVisitor.visitIndexExpression (package:analyzer/src/generated/resolver.dart:1552:5)
#3 IndexExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5993:49)
#4 AstResolver.resolve (package:analyzer/src/summary2/ast_resolver.dart:85:10)
#5 DefaultValueResolver._parameter (package:analyzer/src/summary2/default_value_resolver.dart:107:18)
#6 DefaultValueResolver._parameters (package:analyzer/src/summary2/default_value_resolver.dart:121:7)
#7 DefaultValueResolver._function (package:analyzer/src/summary2/default_value_resolver.dart:89:5)
#8 DefaultValueResolver.resolve (package:analyzer/src/summary2/default_value_resolver.dart:47:9)
#9 LibraryBuilder.resolveDefaultValues (package:analyzer/src/summary2/library_builder.dart:313:43)
#10 Linker._resolveDefaultValues (package:analyzer/src/summary2/link.dart:230:15)
#11 Linker._buildOutlines (package:analyzer/src/summary2/link.dart:89:5)
#12 Linker.link (package:analyzer/src/summary2/link.dart:69:5)
#13 link (package:analyzer/src/summary2/link.dart:33:10)
Change-Id: I6145a1f728d432be8d0fa55235858e091030461c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175187
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-06 05:39:04 +00:00
Konstantin Shcheglov
d518832a7c
Simplify type hierarchy for resynthesize tests.
...
Change-Id: I82ba179c4f2756c63f3a30ea71f5f6332b902a6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-05 18:31:33 +00:00
Sam Rawlins
f1916cf0bb
Analyzer: do not report an undefined getter with an empty name
...
Such code is already reported with parser errors, like missing_identifier.
Change-Id: I7f4cc049aa6129cea84d210ccb4e595e52d96fb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173740
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-05 14:39:03 +00:00
Konstantin Shcheglov
dee85df64d
Basic support for elements/types of non-function type aliases.
...
Change-Id: Ide8f2fff98f7f03375efad23df3ed79795c33a23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174681
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-04 23:32:02 +00:00
Konstantin Shcheglov
416329dafd
Issue 44284. Fix LUB to consider also mixins.
...
Bug: https://github.com/dart-lang/sdk/issues/44284
Change-Id: If1c67dbe4c5be38dd715ca4aa5a1fc82c0911e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174820
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-03 17:32:43 +00:00
Sam Rawlins
e0ebe30190
analyzer: Improve unused_import analysis for shared prefix names
...
Fixes https://github.com/dart-lang/sdk/issues/38784
Change-Id: I42b32261e9ed71018967e228d2ec731a4613205d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147336
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-03 04:00:37 +00:00
Konstantin Shcheglov
ca8c43e3ed
Update FeatureSet(s) in ResynthesizeTestCases.
...
Change-Id: I4966dc7420702a8d40ff4ec8d7e32969bc4db262
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174766
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-02 19:26:38 +00:00
pq
0d145f836b
posix path validation
...
Fixes: https://github.com/dart-lang/sdk/issues/44358
Change-Id: Iaa3e998148f0231dfce14e23cf91b9c721f439b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174600
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-02 02:36:57 +00:00
Konstantin Shcheglov
8a40e19824
Fix analyzer Windows bot.
...
Change-Id: I6c59935930d1d9c78ff21ea37007e7b82c92d1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174680
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-02 01:16:57 +00:00
Konstantin Shcheglov
2dd03f37c9
Issue 44334. Report DUPLICATE_FIELD_FORMAL_PARAMETER for not final FieldFormalParameter.
...
Bug: https://github.com/dart-lang/sdk/issues/44334
Change-Id: I4f70daf9165e31d3948c210b84aee4c00561bd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-01 22:05:27 +00:00
Konstantin Shcheglov
f6362881d5
Make 'uniqueName' a field in ErrorCode.
...
It started as a way to speed up IgnoreValidator, becaus computing
uniqueName as a concatenation of 'runtimeType' and 'name' was expensive.
We solved it in a better way, but I think this change is still useful.
Change-Id: I7d3cb8c91f4ca27a0aa3b93f8572cf12c6757bae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174322
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-01 21:41:08 +00:00
Konstantin Shcheglov
19652ae5ad
Use binary format for summaries.
...
Change-Id: Ibf0221a3c233c958e5065b64207faf9dfae33083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-12-01 21:30:35 +00:00
Konstantin Shcheglov
b4052982b5
Make documentaiton comments Null Safe by default, support %language directive instead.
...
This is consistent with what we do for user project.
Null safety is not an experiment anymore.
OTOH, any future experiments should be applied on top of the latest
language version.
Change-Id: I6dcbc954aefefb1f7a03c9ceaf1d25be28e7adf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-01 06:51:44 +00:00
Konstantin Shcheglov
6c6dba54bd
Replace some uses of StaticTypeAnalyzer2TestShared.
...
R=brianwilkerson@google.com
Change-Id: Ic3ea45d3e894b3991593a2a349909bf289743e93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174489
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-12-01 06:50:14 +00:00
Konstantin Shcheglov
49ca82c4e8
Move literal inference tests from StaticTypeAnalyzer2Test.
...
R=brianwilkerson@google.com
Change-Id: Ie08a60dcd1a0942e5e72ae3a1ed4bb76238786db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-30 20:30:03 +00:00
Konstantin Shcheglov
b1a6afba1c
Remove specialized API for Angular analysis.
...
We have removed the Angular plugin, so we don't need the API.
Change-Id: Ifba20fba248b690f429b6a532dc5333a25f5e610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174400
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-30 19:37:24 +00:00
Konstantin Shcheglov
b200c9d68d
Remove functionTypeAlias tests from FunctionTypeImplTest.
...
These tests were passing by a wrong reason.
It is not possible to express a recursive typedef anymore.
When we try to instantiate `G` in `typedef F = G Function()`, it
will instantiate `typdef G = F Function()` right now, directly into
the corresponding FunctionType, but because we are in the process
of setting the return type of `F` right now, `G` is not yet referenced
in `F`, so is not referened by `G` itself.
Such recursion is possible during linking, but then we break it.
We still report errors, and resolved AST still has necessary references.
Change-Id: I47b18f80b00edd01268c65c3e1786892ad0d5091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174381
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-30 19:37:23 +00:00
Brian Wilkerson
64105a6a15
Improve the highlight range for for_in_with_const_variable
...
Change-Id: I3dfab4f6748e6e93cd416ee031206896274ff989
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-11-29 05:35:17 +00:00
Konstantin Shcheglov
47023e0cc4
Remove unused createDartSdkManager().
...
R=brianwilkerson@google.com , pquitslund@google.com
Change-Id: If0e1b2753fe94d02fe353495cf5d5e7cc43d3617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174226
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 05:12:53 +00:00
Konstantin Shcheglov
6df4279ccb
Remove unnecessary Platform.resolvedExecutable access.
...
R=brianwilkerson@google.com
Change-Id: Ib037100e55bd9d038734d449998385db482de7b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174227
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 05:04:51 +00:00
Konstantin Shcheglov
6e311941bb
Clean up WithNullSafetyMixin in analyzer/ and analyzer_plugin/.
...
Bug: https://github.com/dart-lang/sdk/issues/43837
Change-Id: I2282d0230e5ea0abdd2a08de2a16cfaa602c3cc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-28 04:56:46 +00:00
Konstantin Shcheglov
fe3dd43995
Fix for import directive in part while checking for IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE.
...
Bug: https://github.com/dart-lang/sdk/issues/44280
Change-Id: I6a8ef25deaedc55ef33e83ba7614f23fd56fe788
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-27 21:29:05 +00:00
Sam Rawlins
4a206e4108
Analyzer: Report invalid instance access from closure within factory
...
Fixes https://github.com/dart-lang/sdk/issues/43610
Change-Id: Ie9728d375d01ff8c02831befd5fe04b9f5596e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174020
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-25 23:53:08 +00:00
Paul Berry
e047dd60d6
Ensure that function elements inside local variable elements have unique locations.
...
Fixes #44216 .
Bug: https://github.com/dart-lang/sdk/issues/44216
Change-Id: I5ccf8bb5f90396eabfec470a289a193d2aef16ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173881
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-11-25 13:39:04 +00:00
Sam Rawlins
e33307fd41
Analyzer: account for parentheses when examining enum switch cases
...
Change-Id: I1752140bf4f96b45fedf787c3805a8464b6b0720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-23 16:02:48 +00:00
Keerti Parthasarathy
416c06f19b
Add a method to clear all artifacts in FileResolver
...
Change-Id: I420e1de8f873d350e3d90e23536eaa10770d25f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2020-11-23 07:15:45 +00:00
Sam Rawlins
ef39baee37
Analyzer: Don't report all optional parameters on private ctors as unused
...
Fixes https://github.com/dart-lang/sdk/issues/44268
Change-Id: Ie0f3b004de2761145b7f8acffc3aa82b59a0aea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-21 22:08:43 +00:00
Sam Rawlins
19a96e4d5e
Analyzer: override element type in ExportDirective and ImportDirective
...
This reduces the number of explicit casts needed for null safety.
Change-Id: I8ad0ab9cddbbe81e5fbf66b95ae4ae1cb57efebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172743
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-20 15:22:46 +00:00
Konstantin Shcheglov
12cb02528b
Issue 44248. Don't report MISSING_DEFAULT_VALUE_FOR_PARAMETER for external functions.
...
Bug: https://github.com/dart-lang/sdk/issues/44248
Change-Id: I31d2b6ea8efdf0ce47533d4288b3dcd41d113a2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172901
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-19 18:28:24 +00:00
Konstantin Shcheglov
590c4c4b30
PackageBuildWorkspace should stop at the first pubspec.yaml found, don't go up.
...
Change-Id: I1b996b34055d6887816313d333175869f570ada1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-19 08:08:15 +00:00
Konstantin Shcheglov
3dc16b2ad1
Improve test for inferencing operator== parameter type.
...
See https://dart-review.googlesource.com/c/sdk/+/124284
See https://github.com/dart-lang/language/issues/569
Change-Id: Idbd54bd33b70b22036e23364df4984ae92a55d04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172686
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-18 01:24:29 +00:00
Keerti Parthasarathy
ed5f235c52
Fix windows test failure
...
Change-Id: I9700e4f86eaecd3bd003016fa2bb5a9ec8eaa417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2020-11-17 17:11:08 +00:00
Keerti Parthasarathy
6b64d52de1
Add a method to remove unused FileState's.
...
Change-Id: I6e4644b48245c634cc31a6f32b19be68fd72786b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2020-11-17 04:34:00 +00:00
Konstantin Shcheglov
bb6714c051
Issue 44220. Fix for NPE when checking for INVALID_REQUIRED_* for GenericFunctionType.
...
Bug: https://github.com/dart-lang/sdk/issues/44220
Change-Id: I7a88a8b34fbda140ab12e6861c0b00a5e5c420b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172360
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-11-16 22:06:40 +00:00
Sam Rawlins
8b587b2bd6
Analyzer: prepare summary/ tests will null checks and late hints
...
Change-Id: Iaed59b5283a4b74a77429aef6381f364981161ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171963
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-13 23:57:14 +00:00
Paul Berry
7d3bc4862d
Rename pkg/analysis_tool to pkg/analyzer_utilities.
...
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.
Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-11-13 17:46:30 +00:00
Erik Ernst
f3ffe6dac6
[analyzer] Adjust several visitors
...
This CL adjusts several visitors to visit `type` rather than
`functionType` of `GenericTypeAlias`. This is needed because
`functionType` is now a view on `type`, and the former will be null
in some cases such that the underlying `type` is incorrectly ignored.
Here are the locations not yet modified in this manner:
Visitors:
ResolvedAstPrinter
AstBinaryWriter
BestPracticesVerifier
Non-visitors:
TypeAliasSelfReferenceFinder._sanitizeGenericTypeAlias, _Finder.genericTypeAlias
VarianceBuilder._genericTypeAlias
NamedTypeBuilder._getRawFunctionType,
LinkedUnitContext.getGeneticTypeAliasFunction
_File._buildFileDeclarations
_LibraryBuilder._addGenericTypeAlias
analysis_server, visitors:
_LocalBestTypeVisitor
analysis_server, non-visitors:
InlineTypedef.compute
DartUnitOutlineComputer._newGenericTypeAliasOutline
Files: completion_metrics (about 3 locations in here).
It would be great if I could get some feedback on these: Which ones
are most urgent? Will we keep any of them unchanged?
Change-Id: Ifd55c19571d84bb7ec004b65c5f1f22f3b22cb5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171586
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-11-13 08:21:15 +00:00
Devon Carew
2ba123b86e
[analysis server] remove the --file-read-mode cli option for the analysis server
...
Change-Id: I279233cd0b7ec09a7d2fdcd50837552f56f2584d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2020-11-12 21:42:50 +00:00