Commit Graph

10502 Commits

Author SHA1 Message Date
Konstantin Shcheglov 356fa11349 Extract BoolExpressionVerifier.
Mostly because it also reports UNCHECKED_USE_OF_NULLABLE_VALUE, and
we want to report it during resolution, to use for migration.

Change-Id: I89f988d9be34a70dfe0e590a5fede2696423c89c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132029
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 22:30:18 +00:00
Konstantin Shcheglov 445c0842c7 Use nullable context type for operand of null-check operator. (2)
Initial: https://dart-review.googlesource.com/c/sdk/+/131343
Reverted: https://dart-review.googlesource.com/c/sdk/+/131461

Bug: https://github.com/dart-lang/sdk/issues/39694
Change-Id: I6287338ce347ddc45d6cc1f3cb16fdccbc75c891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 22:30:09 +00:00
Paul Berry 37753f016c Add methods to CollectionElementProvider to get type arguments of typed literals.
We will need to hook into this for migration as well, because the type
arguments of typed literals will be changed by migration from star
types to either nullable or non-nullable types.

Change-Id: Ie721390effd9cf733b9f977c1ba729f6fc4b2ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 22:03:48 +00:00
Paul Berry 3af7abc78b Migration: Remove source parameter from MigrationResolutionHooks API.
The source is already known to the FixBuilder, so it is redundant.

Change-Id: Iafafd6514bbe469ebc2136a65984b388f5c64342
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131881
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-16 22:03:48 +00:00
Paul Berry 3f02e7d749 Migration: add FixBuilder support for generic function type annotations.
Change-Id: Ifca6d611da8d95cfc243c32a3af8bd3a1f03bd54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131880
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-16 22:03:48 +00:00
Konstantin Shcheglov 04a121dea9 Split different operators resolution in BinaryExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I1a4c77d9095aee6aeb0243425d61e9e7ad671eca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 19:41:48 +00:00
Konstantin Shcheglov b94a12b60b Don't flag Never as not available when the non-nullable feature is enabled for the library.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/39597
Change-Id: I5865f467a3b5097fb863d172321f60cbe1f5fd44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132023
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 18:49:27 +00:00
Konstantin Shcheglov c1d2ccfe34 Don't look for Flutter specific analysis options in Bazel workspaces.
Bug: https://buganizer.corp.google.com/issues/147794766
Change-Id: Ia0e085157d89e9d3cd70580622ff6af3f3f141f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 18:10:47 +00:00
Konstantin Shcheglov 8c82979b76 Revert "Remove StrongModeCode.IMPLICIT_DYNAMIC codes."
This reverts commit a3ea61c3d0.

We decided that analyzer should continue to provide this
functionality, at least until we have a better replacement.

Bug: https://github.com/dart-lang/sdk/issues/40129
Change-Id: Idd5ae37a6b8f8d39d374df2b0aaa04d7ee8bf3d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131723
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 17:37:57 +00:00
Konstantin Shcheglov c0a501ba8d Report LATE_FINAL_LOCAL_ALREADY_ASSIGNED also for prefix / postfix expressions.
Change-Id: I9c47e0a992b807c18a26af885902d4196fe64772
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131907
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 17:28:47 +00:00
Konstantin Shcheglov 9ed450f376 Remove imports (unused) to package_config.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/39762
Change-Id: I616dfc8b3798276a8043933c70de74a997ae5e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131948
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 17:28:26 +00:00
Paul Berry 2b756f6b02 Migration: add FixBuilder support for IfElement.
One minor issue remains: when dead code elimination causes a
collection to become empty, migration should insert explicit type
parameter(s) to ensure that the empty collection will still get
analyzed as having the right type.  This is noted in TODO comments.

Change-Id: Ibed25f6cb8ed9eec3ddccb0444178960c6b35c84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131843
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-16 06:45:35 +00:00
Paul Berry 53bef4bb07 Create an abstract layer to customize querying collection elements.
This will be needed for the NNBD migration engine, so that when it
re-runs resolution to see what the types will be in migrated code, it
can tell the resolver to skip or modify collection elements to account
for dead code elimination.

The runtime overhead of this abstraction should be negligible, since
under normal analyzer operation, there will only be a single const
instance of this class, and no instances of any subclasses.  So the VM
should be able to trivially inline all uses of the abstraction layer.

Also add SetOrMapLiteralImpl.becomeUnresolved(), which is used to
reset literals to the "unresolved" state before they are resolved.
This will be necessary so that when the migration engine re-resolves a
set or map literal, the determination of what kind of literal it is
will be made afresh.

Change-Id: Id8e95c944acb892c60d3d92a7facc20d08604211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131842
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-16 06:45:35 +00:00
Konstantin Shcheglov 6525fc9057 Fix for crash: type 'DefaultParameterElementImpl' is not a subtype of type 'FieldFormalParameterElementImpl'
#0      ResolutionVisitor.visitFieldFormalParameter (package:analyzer/src/dart/resolver/resolution_visitor.dart:458:7)
#1      FieldFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:4123:49)
#2      ResolutionVisitor.visitDefaultFormalParameter (package:analyzer/src/dart/resolver/resolution_visitor.dart:370:21)
#3      DefaultFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:2999:15)
#4      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#5      FormalParameterListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4451:17)
#6      RecursiveAstVisitor.visitFormalParameterList (package:analyzer/dart/ast/visitor.dart:887:10)
#7      FormalParameterListImpl.accept (package:analyzer/src/dart/ast/ast.dart:4447:49)
#8      ResolutionVisitor.visitFunctionExpression.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:596:25)
#9      ResolutionVisitor._withNameScope (package:analyzer/src/dart/resolver/resolution_visitor.dart:1275:8)
#10     ResolutionVisitor.visitFunctionExpression.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:591:7)
#11     ResolutionVisitor._withElementHolder (package:analyzer/src/dart/resolver/resolution_visitor.dart:1253:8)
#12     ResolutionVisitor.visitFunctionExpression (package:analyzer/src/dart/resolver/resolution_visitor.dart:590:5)
#13     FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:4969:49)
#14     ResolutionVisitor.visitVariableDeclaration.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:980:27)
#15     ResolutionVisitor._withElementHolder (package:analyzer/src/dart/resolver/resolution_visitor.dart:1253:8)
#16     ResolutionVisitor.visitVariableDeclaration.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:979:9)
#17     ResolutionVisitor._withElementWalker (package:analyzer/src/dart/resolver/resolution_visitor.dart:1264:8)
#18     ResolutionVisitor.visitVariableDeclaration (package:analyzer/src/dart/resolver/resolution_visitor.dart:971:7)
#19     VariableDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:10408:49)
#20     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#21     VariableDeclarationListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10512:16)
#22     ResolutionVisitor.visitVariableDeclarationList (package:analyzer/src/dart/resolver/resolution_visitor.dart:995:10)
#23     VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:10506:15)
#24     FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3993:17)
#25     RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:857:10)
#26     ResolutionVisitor.visitFieldDeclaration (package:analyzer/src/dart/resolver/resolution_visitor.dart:449:11)
#27     FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:3988:49)
#28     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7520:20)
#29     ResolutionVisitor.visitClassDeclaration.<anonymous closure>.<anonymous closure> (package:analyzer/src/dart/resolver/resolution_visitor.dart:245:22)


Change-Id: I2402751a3b88e9df934a2f6660813826244f827a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 21:10:47 +00:00
Konstantin Shcheglov 9ae4849386 Report LATE_FINAL_LOCAL_ALREADY_ASSIGNED.
Change-Id: Ifa1706b6aecf53ec15578b13a4cc5931fbba3b2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-15 19:28:56 +00:00
Johnni Winther 862d5012ae [cfe] Handle explicit opt-out in nnbd-not-enabled message
Closes #39835

Change-Id: I4ffa3377289f45b7ea909b5477ba53508040b9d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131076
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-15 10:30:43 +00:00
Konstantin Shcheglov c3a2ed9555 Fix failing tests on unittest-asserts-release-win after analyzer Packages change.
Change-Id: Iec83b5d02d10e3b93f2e1e734bd155189f9ef2d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131780
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 03:10:24 +00:00
Konstantin Shcheglov 924f4e0549 Downgrade receiver of type Never to hint.
Bug: https://github.com/dart-lang/sdk/issues/40057
Change-Id: I49f56b7efa4c88a86fda071c6063b308062784bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 01:33:24 +00:00
Konstantin Shcheglov b68f844570 Issue 40057. Fix for Never as setter receiver.
Bug: https://github.com/dart-lang/sdk/issues/40057
Change-Id: Ia53e01b7aa5e41a80e88b14aabdffc31cbc683b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131706
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-14 21:33:23 +00:00
Paul Berry fc8a02ee3c Pass TypeSystem and TypeProvider into TypedLiteralResolver.
Previously, TypedLiteralResolver obtained them from the library, but
this didn't work when the resolver was invoked by the migration tool,
because the migration tool needed to re-run migration of a non-NNBD
library using the NNBD TypeProvider and TypeResolver.

Change-Id: I73acca120a726c773c2e08b65d1227531a5fd2e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131704
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-01-14 20:41:23 +00:00
Paul Berry 9786c9c063 Migration: wire up elimination of dead if branches to FixBuilder.
Change-Id: I317c2476aa21e556333729893872b937a46a82e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131583
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-14 20:41:23 +00:00
Paul Berry a57350be7b Migration: Add logic to FixAggregator to eliminate dead "if" branches.
Change-Id: Icfe62535f588c691086835ae22c80b49191be514
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-01-14 20:41:23 +00:00
Konstantin Shcheglov 96cbfb4a2c Issue 39059. Check for minor / major version overflow.
Bug: https://github.com/dart-lang/sdk/issues/39059
Change-Id: I78a5598b2433d772409a41f7c6e87b32f859c6be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131705
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-14 20:08:13 +00:00
Konstantin Shcheglov d44d7d4573 Extract AssignmentExpressionResolver.
Change-Id: I9a019ba499a12431955bf9ee45bfe0ae375a52f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-14 18:08:15 +00:00
Sam Rawlins fe666ce592 Report unused public static members of private classes
Also of private mixins, enums, and extensions.

Fixes #39988

Change-Id: I646205cba64da1a9837585a5af2c4c2b8d41824c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129860
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-14 06:09:04 +00:00
Konstantin Shcheglov c0b1a0a599 Switch analyzer perf to using analyzer Packages.
Change-Id: Ib6fe433e9fcf956058913589f434954cc18fdd41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-14 01:41:34 +00:00
Konstantin Shcheglov 16f07ea19e Revert "Use nullable context type for operand of null-check operator."
This reverts commit 856a270823.

Reason for revert: breaks ddc-nnbd-linux-release-chrome

Original change's description:
> Use nullable context type for operand of null-check operator.
> 
> R=​brianwilkerson@google.com
> 
> Change-Id: I463dafe91392047a6902dffa5ab937174e4d87c9
> Bug: https://github.com/dart-lang/sdk/issues/39694
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131343
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: I0e3a16b8c06ba539fbc415029db15e889849baba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/39694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 21:22:38 +00:00
Konstantin Shcheglov 00a6b52587 Test that invocation of a method on a nullable interface type prefers nullable extension.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/39875
Change-Id: Iaed3d26819b05eb501c1cb91e3e339b59f3079a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 19:39:27 +00:00
Konstantin Shcheglov b5f4351060 Move ABSTRACT_SUPER_MEMBER_REFERENCE tests.
R=brianwilkerson@google.com

Change-Id: I8e2f598094cf9a6b6f6887d0216ef2802d0c56e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 19:26:16 +00:00
Konstantin Shcheglov ca31f1d8c6 Refactor FunctionExpressionInvocationResolver to support Never.
Bug: https://github.com/dart-lang/sdk/issues/40055
Change-Id: Ic53b23178441a32d9de6fe0d2b6d5f4c646de75b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 19:19:07 +00:00
Konstantin Shcheglov 2dd37b65a8 Add findPackagesFrom().
Change-Id: I33c4cc50fd01069790c1c759668d378b77e40e41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131346
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 17:31:51 +00:00
Konstantin Shcheglov abe7c1a2c4 When NNBD, use nullable iterable type for null-aware spreads.
Bug: https://github.com/dart-lang/sdk/issues/39694
Change-Id: I15c77e63c1e80c65b06e74dca248b93e9214db63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131345
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 17:29:21 +00:00
Konstantin Shcheglov 6f1bcee053 Extract ifNull resolution in BinaryExpressionResolver.
Change-Id: I686b031f2b614a0b14790379dbe6229ee4d135c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 17:23:47 +00:00
Konstantin Shcheglov 856a270823 Use nullable context type for operand of null-check operator.
R=brianwilkerson@google.com

Change-Id: I463dafe91392047a6902dffa5ab937174e4d87c9
Bug: https://github.com/dart-lang/sdk/issues/39694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 01:37:04 +00:00
Konstantin Shcheglov da6696ba26 Use analyzer Packages.
Change-Id: Ifd8b2bb0c446bf2f7321727bc87179152244f84b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-13 00:37:14 +00:00
Konstantin Shcheglov 04b5bd9d68 Extract null check in PostfixExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I9063a3cf0dc9e0714020c468f1ceeec13e83384b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 23:17:34 +00:00
Konstantin Shcheglov 92546833e6 Remove packageMap and hasFlutterDependency from Workspace interface.
Change-Id: I8b5c09a0331f038d32a634ee3d1b40dc695b5351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 18:01:28 +00:00
Konstantin Shcheglov ecebc29e6f Do negation resolution in one method.
R=brianwilkerson@google.com

Change-Id: Idb8b867e1a4fd0123c19caf8776e5f312df854bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 17:53:43 +00:00
Konstantin Shcheglov 489c0be893 Extract PostfixExpressionResolver.
Change-Id: I915453f32d65f74e2ec12dd65bd17620bbb7d4ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 17:53:24 +00:00
Konstantin Shcheglov bd018fbd1a Issue 39694. LHS of ?? should be inferred with a nullable context.
Bug: https://github.com/dart-lang/sdk/issues/39694
Change-Id: I481a8792b0c3587a505263f52f65e7cc4fc4f067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131210
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-11 21:14:22 +00:00
Konstantin Shcheglov 92f14eee94 Stop passing ContextBuilder to Workspace(s).
R=brianwilkerson@google.com

Change-Id: I101a6c4cd91dcdffb9c76c88e7d6b3995f6109b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-11 19:45:12 +00:00
Konstantin Shcheglov a62aaddcf2 Use ElementTypeProvider in MethodInvocationResolver.
Change-Id: I1a1ad92e01ae52523d39ad861e7f1a41ca3c2a91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-11 17:38:17 +00:00
Konstantin Shcheglov 33d468dceb Extract BinaryExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I25ed5c2cea682cd32b324693fc0098dc724d8cb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-11 17:30:14 +00:00
Konstantin Shcheglov e6809a3fe3 The invoked type cannot be InterfaceType at this point.
R=brianwilkerson@google.com

Change-Id: I59c0ad9246011cae7e20c00be81aa7d8ac6e222b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130938
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 23:40:02 +00:00
Konstantin Shcheglov a7641ad9ae Use implementation from InvocationInferenceHelper in MethodInvocationResolver.
R=brianwilkerson@google.com

Change-Id: I86e0234b4019bf3d4f9c48af70f4751899639fd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130937
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 23:27:22 +00:00
Konstantin Shcheglov 1a6667df53 Use analyzer's Packages for GnWorkspace.
R=brianwilkerson@google.com

Change-Id: I4fc619e8025ec5f2375f3a5b8a267c1640dddea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 23:07:22 +00:00
Konstantin Shcheglov b95a864147 Move FunctionExpressionInvocation inference to InvocationInferenceHelper.
R=brianwilkerson@google.com

Change-Id: Ie25938f0c455c9481b84585d061765a97c104506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 22:12:12 +00:00
Konstantin Shcheglov 763b682963 Provide packages map to PackageBuildWorkspace.
Change-Id: Ibca7748c5c1260f392e931063cd1990eb26f8117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130934
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-10 21:51:22 +00:00
Konstantin Shcheglov d9906ab2c1 Remove unused private ForStatementImpl constructor.
R=brianwilkerson@google.com

Change-Id: I288746414b2074167ad7f625a8a053787d383d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 18:45:11 +00:00
Konstantin Shcheglov e7ed0819f1 Separate inference with and without type arguments in FunctionExpressionInvocationResolver.
R=brianwilkerson@google.com

Change-Id: I3849750c1cfe181a7b9f8efab3d1587bc2402eda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-10 18:21:41 +00:00