Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov 6cfef5017f Remove special handling of Object in PrefixedIdentifierResolver.
It is already handled in TypePropertyResolver.

Change-Id: I83a14a459042d3c2a321913254d87c7c959d5270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164247
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-24 01:17:59 +00:00
Konstantin Shcheglov ac5c140f60 Extract PrefixedIdentifierResolver.
Element resolution is improved to use PropertyElementResolver.
And we don't call setReadElement() and setWriteElement() anymore.

Type analysis is kept as is for now.

Change-Id: If14a5b5690947f335e05a43f3f6166c0a228f9eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-23 21:47:59 +00:00
Konstantin Shcheglov 75ea66605a Infer Object when subtype matching dynamic/void vs. Q?.
See https://github.com/dart-lang/language/pull/1200

TGP looks green.
https://test.corp.google.com/ui#id=OCL:333332281:BASE:333335686:1600887590104:a120780c

Bug: https://github.com/dart-lang/sdk/issues/43162
Change-Id: I1102fc5ee7c3210aa990c9f71f905190cd1665e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-23 21:24:09 +00:00
Jacob MacDonald 6cb9c66f28 Reland "Update SDK version to 2.11"
This reverts commit e834f9cf6e.

Reason for revert: Flutter has updated package versions to those that allow 2.11

Original change's description:
> Revert "Update SDK version to 2.11"
>
> This reverts commit 45ffef71e8.
>
> Reason for revert: This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
>
> TBR=athom@google.com,johnniwinther@google.com,jakemac@google.com
>
> Original change's description:
> > Update SDK version to 2.11
> >
> > Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
> > Reviewed-by: Alexander Thomas <athom@google.com>
> > Reviewed-by: Jake Macdonald <jakemac@google.com>
> > Commit-Queue: Johnni Winther <johnniwinther@google.com>
>
> This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.
>
> TBR=athom@google.com,johnniwinther@google.com,jakemac@google.com
>
> Change-Id: Ie00b8c77a16d863105517856118459e3e289d914
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163704
> Commit-Queue: Alexander Aprelev <aam@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Reviewed-by: William Hesse <whesse@google.com>

TBR=whesse@google.com,aam@google.com,athom@google.com,johnniwinther@google.com,jakemac@google.com

Change-Id: Iec81adfb047b3f5387cdc817af3b08e6c086430a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164241
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-09-23 19:54:49 +00:00
Devon Carew feb482abb5 [analyzer] remove unused command line options
Change-Id: I2bb415fefe7e1ebe95cea533f4979ca5f8cff4fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164180
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 19:21:59 +00:00
Konstantin Shcheglov 3b9e300b9c Extract AnnotationResolver.
Just as is, without any attempt to clean it up for now.

Mostly to get it out of the way to clean up Prefixed/SimpleIdentifier
resolution.

Change-Id: I36c3338beb065bb834ed1b7ba8cc3ff7241d03f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-23 18:37:49 +00:00
Sam Rawlins 863821476c Analyzer: Report invalid use of internal members
Bug: https://github.com/dart-lang/sdk/issues/28066
Change-Id: Iee39fee48340fb9311a8f7a07d1ae7aa474a22f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163961
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 17:51:49 +00:00
Paul Berry f157b5ff80 Flow analysis: promote type X&T on initialization.
When flow analysis encounters a variable declaration of the form `var
x = expr;`, if the type of `expr` is `X&T`, then the variable is given
the inferred type `X`, but it is immediately promoted to `X&T`.

Change-Id: I2a5ffca3860ab009f0942e6efc641c1604ab6323
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-23 16:58:09 +00:00
Danny Tuppeny f820c1fb8e [Analyzer] Support using \r\n in correction tests when running on Windows
Change-Id: Id56e7c17974d5036706dbe451a2c307907bdcd3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163208
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-23 07:53:16 +00:00
Konstantin Shcheglov e89279c85f Resolve IndexExpression and PropertyAcces as read only.
All writes are handled in corresponding assignment (-like) expressions.

Change-Id: Iab4220f7fce55daebd8aac1c90bf81efe3d7d8e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-22 21:59:31 +00:00
Konstantin Shcheglov 8e8836c768 Record log entries as FileResolver loads / removes libraries.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I566ad9488351ef777a35d48979b32ce106c88597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-22 19:31:31 +00:00
Konstantin Shcheglov 74d47c9891 Resolve PrefixExpression and PostfixExpression using shared write resolution.
Change-Id: Iebdcfe3e633836cdfc546d4bfa45a302a883985e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-22 18:49:00 +00:00
Konstantin Shcheglov a7ae2dbce9 Move shared portions of AssignmentExpressionResolver._resolve_ back into resolve().
Change-Id: I2e7171c49aa8325a49afbe70c2cbfa9115b580b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-22 14:48:57 +00:00
Konstantin Shcheglov a2cd89fb83 Include all library files with Cider exception.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I894a7504cb19249c812212f3ef65ce5f10737e7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163820
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-22 14:41:43 +00:00
Paul Berry f860868740 Flow analysis: remove old "promotable via initialization" logic.
This logic was removed from the spec in
https://github.com/dart-lang/language/commit/b70bb3f90679eb1c67b7ee852e1322046b2e4777.

Only a few places in the SDK itself were relying on this promotion
logic; I've fixed those places by adding explicit types.

Change-Id: Iaeaebe8dd5ab3e848699bc8ebc64a1ae80c1027a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-22 12:22:13 +00:00
Alexander Aprelev e834f9cf6e Revert "Update SDK version to 2.11"
This reverts commit 45ffef71e8.

Reason for revert: This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.

TBR=athom@google.com,johnniwinther@google.com,jakemac@google.com

Original change's description:
> Update SDK version to 2.11
>
> Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

This breaks flutter hhh as packages that flutter depends on have upper bound of 2.10. This should be relanded after those packages have their upper bound raised.

TBR=athom@google.com,johnniwinther@google.com,jakemac@google.com

Change-Id: Ie00b8c77a16d863105517856118459e3e289d914
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163704
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-09-21 23:30:34 +00:00
Konstantin Shcheglov 5120a33aa6 Resolve IndexExpression in AssignmentExpressionResolver.
Change-Id: Ibaf1dad7d7dc271b73476ef61742d6d72aba0380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163723
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-21 21:18:42 +00:00
Konstantin Shcheglov 8605286e11 Make constant-update-2018 available since 2.0.0
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462

Change-Id: Id844473e0cb371ffc4470a18993c66c8ad0427e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163503
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-09-21 20:39:32 +00:00
Konstantin Shcheglov b4a09d8dec Catch exceptions from File.resolveSymbolicLinksSync()
Bug: https://buganizer.corp.google.com/issues/169040783
Bug: https://github.com/dart-lang/sdk/issues/43497
Change-Id: I5f4c1ffaec4af2d4d3855b9a99c3a78c36401ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-21 18:36:32 +00:00
Johnni Winther 45ffef71e8 Update SDK version to 2.11
Change-Id: I9ffec7e098fd77dcc0cd48b70613d919bda45672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161342
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-21 11:22:26 +00:00
Konstantin Shcheglov 04591ddfbc Move demoteType() into TypeSystemImpl.
R=brianwilkerson@google.com

Change-Id: I0c5ff9fcc3b3ec912e82fa91752e097f430b603c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-20 05:53:27 +00:00
Konstantin Shcheglov cf5e8a7a2f Use Object* or Object? when LUB with a type parameter.
Not the full fix yet.

Bug: https://github.com/dart-lang/sdk/issues/43478
Change-Id: Ic405ebdab4b5a1a6816328cfa66b55478dd60c71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-19 21:43:07 +00:00
Konstantin Shcheglov 089a3a0de0 Clean up resolving assigned/node types in AssignmentExpressionResolver.
Change-Id: Ia8e0a2d39492dc44cf36182fb125b0718ccff105
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163502
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-19 19:20:57 +00:00
Konstantin Shcheglov 0c8d9576eb Remove unused hasPromotedTypeVariable().
Change-Id: Ia8c40e6675ad9fc6eaeb02772cbe8a9b470b89d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-19 17:51:17 +00:00
Konstantin Shcheglov 01154855d1 Make control-flow-collections, set-literals, spread-collections available since 2.0.0
See https://github.com/dart-lang/language/issues/286#issuecomment-503614115
and https://github.com/dart-lang/sdk/issues/43462

Change-Id: Ib8c37a2b5e3ce6c737e496bf285d946baf3a41d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-19 16:12:07 +00:00
Sam Rawlins 51840c501a Analyzer: add two checks for the @internal annotation.
The meta package does not yet have an `internal` constant;
this CL just adds one to the mock packages for testing.

Two checks are implemented:

* Hint if an @internal annotation is found on an element which is
  already part of a package's public API (based on file path).
* Hint if an element annotated with @internal is exported from a
  package's public API.

The notion of "public API" is also implemented for each type of Package:
BasicPackage, BazelPackage, GnPackage, PackageBuildPackage,
and PubPackage.

Bug: https://github.com/dart-lang/sdk/issues/28066
Change-Id: Ifc2709028afcd241f59e802f5952539f717704c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163126
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-18 23:04:06 +00:00
Konstantin Shcheglov f3acf0caab Move nonNullifyLegac() to TypeSystemImpl.
Change-Id: I057447c029cdaf89f497e42e2a8521c777c92ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163481
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-18 22:36:36 +00:00
Brian Wilkerson e20a5d171c Add a utility to make it easier for lint rules to check whether a feature is enabled
Change-Id: I304286df6bad6ea4c56bd77309e677c3a7170e5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-18 19:30:46 +00:00
Konstantin Shcheglov ffe53f03f9 Remove TypeSystem / TypeProvider from ConstantEvaluationEngine.
We always need to use the properties of the library.
So, these "default" values are not usable.

Change-Id: I94c63d28900186a7f0e0733717612683aaed122f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-18 18:44:36 +00:00
Konstantin Shcheglov aab7e93b15 Preserve element and typeArguments of FunctionType during legacy erasure.
Change-Id: I02670f86773ed65b0943c9a28fd03e89da2208ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163301
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-18 00:04:41 +00:00
Konstantin Shcheglov cefa35962d Issue 43465. Break infinite recursion that might happen with file system links.
Bug: https://github.com/dart-lang/sdk/issues/43465
Change-Id: I1f5f17af019345ba361a507263fdfea7cb9b0952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-17 23:53:51 +00:00
Nate Bosch 19e497ca05 Fix typo librarys -> libraries
Change-Id: I28c686193fa0385257645439f9d898d8661f67a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163300
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-17 23:25:21 +00:00
Konstantin Shcheglov 044d3d5e22 Add MemoryResourceProvider.newLink()
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/43465
Change-Id: I56a33413cc297b1c362b92b60999e3b506d5e139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163264
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-17 22:40:01 +00:00
Konstantin Shcheglov 5051d75bc6 Issue 43462. Compute constant values in libraries with contain them.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/43462
Change-Id: I82200c06b1a77f634b7c7f30fd3ad7e10eb01ad4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-17 21:26:13 +00:00
Konstantin Shcheglov b820083ed9 Issue 43439. Identify invalid URIs with double '/' or '.' in BazelPackageUriResolver.
Bug: https://github.com/dart-lang/sdk/issues/43439
Change-Id: Ifc7f24ff0e4938d85ddd225fbf576d3a60cc608c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163134
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-17 21:09:43 +00:00
Sam Rawlins f28fb78e8f Analyzer: Use 3 upcoming pedandic lints
Change-Id: I7bd1d856024feee5c4e3ab346a46db059b692b53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-09-17 16:20:42 +00:00
Paul Berry 53e707f26d Flow analysis: don't consider a foreach-declared variable to be written to.
When performing flow analysis for a "for each" loop such as `for (var
x in ...) { ... }`, we don't need to consider the iterated value to be
"written to" the variable `x`, since the actual runtime semantics are
to create a fresh instance of the variable `x` each time through the
loop, initialized to the iterated value.

Fixes #43136.

Bug: https://github.com/dart-lang/sdk/issues/43136
Change-Id: I497c408c3efc26e93502de8ba0530bb5278e74c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-16 19:07:58 +00:00
Paul Berry 0eec9ee53c Use promoted type to infer for-each iterables.
Fixes #42653.

Change-Id: I90319b775207e6cc1c6b7a79d29b2c237b750845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162625
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-09-16 18:20:48 +00:00
Konstantin Shcheglov 4b30c91266 Resolve PrefixedIdentifier in AssignmentExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I4239dba7f6f6255e0db501a7588ca3a51ee18416
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163003
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-16 16:17:38 +00:00
David Morgan 8d8df2c9f6 Revert "Issue 43162. Change matching dynamic/void vs. 'T?'."
This reverts commit 7b0aeb2ac8.

Reason for revert: regressions in analysis in legacy mode, see b/168675476

Original change's description:
> Issue 43162. Change matching dynamic/void vs. 'T?'.
> 
> Bug: https://github.com/dart-lang/sdk/issues/43162
> Change-Id: I8ae2166e4bc593b42ddd39c35e7d02a706d7b94d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162621
> Reviewed-by: Leaf Petersen <leafp@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I288f8ccf82c17565c40e02245998590ebd7c98bc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/43162
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162747
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-09-16 07:36:05 +00:00
Konstantin Shcheglov 7b0aeb2ac8 Issue 43162. Change matching dynamic/void vs. 'T?'.
Bug: https://github.com/dart-lang/sdk/issues/43162
Change-Id: I8ae2166e4bc593b42ddd39c35e7d02a706d7b94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162621
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-16 02:31:02 +00:00
Konstantin Shcheglov f7d1c55a19 Resolve 'call' on FunctionType(s), and Never in TypePropertyResolver.
Change-Id: I357e3704ab48378d4f4f87dbc41148193c23d592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-15 21:32:02 +00:00
Konstantin Shcheglov 54e89a5c82 Resolve '[]' and '[]=' as other InterfaceType members.
Change-Id: I60372b17f383854a108831a0bfe2a85fadb306fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162940
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-15 17:04:11 +00:00
Konstantin Shcheglov 744e34aec0 Support type parameters in ReplaceTopBottomVisitor.
See https://github.com/dart-lang/language/pull/1133

Change-Id: I3800b88496a8bf214b4bc366f4cb7ef3e9968f17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162784
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-15 04:39:31 +00:00
Konstantin Shcheglov c20d17b18f Change TypePropertyResolver and ResolutionResult to specify if an error should be reported.
Change-Id: I4fd76b605acfb12488cfedd2571b1af964fdbd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-15 04:36:41 +00:00
pq 62abba754b validate returns of @doNotStore
See: https://github.com/dart-lang/sdk/issues/42497

Change-Id: I86516a19eb7a6560f95ea888ab1384208da222f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162821
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-14 23:59:08 +00:00
Konstantin Shcheglov a08054586c Report errors on the compound assignment operator, not the left expression.
Change-Id: Icc53a35082cdbbb05db3f009eb9d6b743ef9e7a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-14 18:19:09 +00:00
Konstantin Shcheglov 75fe96d8f2 Don't look for properties in FunctionType in TypePropertyResolver.
Change-Id: I493c9af62bb6ed3de90e46d0391698c009058d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-14 15:44:29 +00:00
Konstantin Shcheglov 410dbc2bf8 Show only methods to resolve PrefixedIdentifier and PropertyAccess from PropertyElementResolver.
Change-Id: I62fd83fefb1b5c0d8deda367288d561a9844937d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-14 15:36:25 +00:00
Konstantin Shcheglov 9fffe7e4df Simplify resolution of operator element in AssignmentExpressionResolver.
Change-Id: I51a9dc087ef70dade5d1db8714e934565d760952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-14 15:36:24 +00:00