Commit Graph

5190 Commits

Author SHA1 Message Date
Dan Rubel 0c891451a8 cleanup parser forwarding and test listeners
Change-Id: I593f8bf862179684a031c9538def62c8415c0d77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-22 22:11:40 +00:00
Sam Rawlins b22cd05c51 Reland fix for #28233: add hint for missing returns to function expressions
The bulk of this change is actually correcting missing returns in the Dart SDK.

Bug: https://github.com/dart-lang/sdk/issues/28233
Change-Id: I52bcbc6c6f4a129d3fc22003f4448a7c3d4487ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100301
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-22 18:12:30 +00:00
Brian Wilkerson 7d1b54bd47 Add a minimal implementation of ExtensionDeclaration
Change-Id: I5a556ea1819b38a3130e801a3cbc4bcbad98dcdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103380
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-22 12:43:02 +00:00
Konstantin Shcheglov 4317c5ff3f Don't set elements and types during AstRewriteVisitor.
Resolution is incomplete at the time when we perform rewriting.
For example, in `C<int>` the type of `int` is not set, so we get
incomplete InterfaceType of `C` with `null` as the type argument.
This was crashing summary2 in one situation internally.

R=brianwilkerson@google.com

Change-Id: Ifcff68f007a90b5694cf3e4e4d3825309c04e2b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-22 03:29:17 +00:00
Mike Fairhurst 6457ac1d4b Test potentially-nullable access errors
Change-Id: Ia166dbb6fb353120e30555f60b7bea186537b05b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-22 03:17:00 +00:00
danrubel add95652d2 fix AstBuilder invalid getter recovery
This fixes the Astbuilder recovery when encountering "get <identifier> :"
in a class body to build a method node rather than a constructor node.

Fix https://github.com/dart-lang/sdk/issues/36961

Change-Id: I48242838d72c3a6c18e78a469b6e07fd1481d0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-22 00:28:55 +00:00
Mike Fairhurst 27e1c91c39 Add src/diagnostics test for assert(bool?)
Change-Id: I152e279db363ceb0efdb71d5741ada4a5341b8fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102521
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-21 22:17:15 +00:00
Konstantin Shcheglov e20da9c220 Fix order of resolving / writing / reading of function / method declarations.
Now that we assign indexes to occurred GenericFunctionType nodes, we
need to make the order consistent across all visitors.

R=brianwilkerson@google.com

Change-Id: Ifc9c7bfa35612cef235f000f30130d36116067e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-21 19:40:17 +00:00
Mike Fairhurst 2b6b0e00d9 Fix resolveToBound for nullability
Change-Id: I510c349251588356677d52574f259706ec2047e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103183
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-21 17:58:56 +00:00
Konstantin Shcheglov 58cf83df4d Don't crash on during indexing references to named parameters of a generic function types.
R=brianwilkerson@google.com

Change-Id: I0da0b1785d7dab2c7c84527317e542b7ef718bd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-19 19:08:31 +00:00
Konstantin Shcheglov 5e5b03881c Fix for exporting setters.
R=brianwilkerson@google.com

Change-Id: Ie67834547a94a480e8ed86df430c40bcb36e37e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-19 17:50:09 +00:00
Konstantin Shcheglov 234103f9d4 Fix for hasImplicitReturnType.
R=brianwilkerson@google.com

Change-Id: I94e1e0f8246f3ff0d284ef7b1de6f618ad464592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102984
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-19 17:50:07 +00:00
Paul Berry 2d8fc016b9 Sort declarations in resynthesize_common.dart
Change-Id: Iec0312bf5dc0abdbe9729c90bebade65b2ba3c74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102982
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-18 15:47:46 +00:00
Paul Berry f930d674ca Restore old nullability behavior of TypeParameterElement.type.
It doesn't work to make TypeParameterElement.type choose
nullability/non-nullability based on the enclosing library, because
for type parameters of synthetic function types, there is no enclosing
library.

Change-Id: Ic74cc639534e3c03f3c46e7eacfb5655ca74019a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102981
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-18 15:05:26 +00:00
Brian Wilkerson ce62987c9d Remove DynamicState and make NumState an abstract class
Change-Id: I6c3ec94a26f6522d24cf964823b739dfe2c42c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-18 14:18:46 +00:00
Konstantin Shcheglov 9b1c8fca91 More fixes for GenericFunctionType.
1. Read GenericFunctionType fully, but in two steps to avoid recursion.
   We need to read it fully, because it might be a part of a const
   initializer, so the client might request the initializer expression,
   and there is no way to him to finish reading. Amnd in general, we
   don't read expressions lazily.

2. For consistency we need to set identifiers for all GenericFunctionType
   nodes that we want to store. So, DeclarationResolver should be updated
   to move the identifier number even though we don't use the same
   mechanism for building elements ininitializers, as we use for type
   annotations outside expressions.

R=brianwilkerson@google.com

Change-Id: I58faa5408bff5250a8c775249438def7f742594b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-18 00:20:36 +00:00
Konstantin Shcheglov cf15dc17e0 With summary2 FunctionTypedFormalParameter has type parameters.
This re-applies changes to tests from https://dart-review.googlesource.com/c/sdk/+/100620

R=brianwilkerson@google.com

Change-Id: If6721d2febb39b52277fdb39845bb2486cb6eb47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-17 23:31:16 +00:00
Paul Berry 8d52c0d08e Store library nullability status in LibraryElement; adjust TypeParameterElement.type based on it.
Change-Id: I0a9673b3b2f46bbf5c3aea429e90c6ddafa978e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102224
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-17 21:27:21 +00:00
pq af2d02f9c8 fix lint code reporting
Fixes: https://github.com/dart-lang/linter/issues/1568

Change-Id: I38d6138aa76fd79c11ef4d603705fdf2e29541e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-05-15 15:36:39 +00:00
Paul Berry 27df933bd1 Fix some hints in the analyzer package.
Change-Id: I46dd91ef2a78dffc08f2fdb45d9646a966a3315d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102380
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-13 12:51:30 +00:00
Konstantin Shcheglov 42c35d7bd6 Optimize summary2.
1. Don't store tokens.
2. Start moving toward storing only semantic information.
3. Don't use DeclarationSplicer, DeclarationResolver.
4. GenericFunctionType(s) don't work, we need a way to associate AST
location to summary location. I think it is solvable.

Change-Id: If0bf9f20f8092068488322129853b788dd947eb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102127
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-11 15:49:39 +00:00
Mike Fairhurst b91a4f5423 [analyzer] Resolve methodName staticType when Function to check Function?
Change-Id: I85d43821d4b792c269f386616dcc21d144772c5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102201
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-10 21:45:29 +00:00
Paul Berry 11b59bec8d Store compilation unit NNBD status in unlinked summary.
This is needed for two reasons:

1. Summary linking, because type inference needs to behave differently
for opted-in vs. opted-out libraries.

2. Summary resynthesis, because TypeParameterElement.type needs to
behave differently for opted-in vs. opted-out libraries.

Note that reason 1 won't apply to the summary2 mechanism, because it
has access to full ASTs when doing type inference.  But it will still
need to record compilation unit NNBD status for reason 2.

This CL merely stores the correct data in the summary; it doesn't
address resynthesis, linking, or summary2.

Change-Id: I1aa2226e5865ef76747267de6198223997d6ad0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101920
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-10 21:34:08 +00:00
Sam Rawlins dac5a56422 Fix workspace/package identification for package:build packages
Fixes https://github.com/dart-lang/linter/issues/1393

Change-Id: I064faad8da50bc1a6c8a80a0412f792914915f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-10 21:31:18 +00:00
Brian Wilkerson 5cffcd9e2c Add the class NonNullableTypeProvider to access SDK classes in opted-in context
Change-Id: Id0cd7c8cd6f93701a5e603753b10a27236292d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102202
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-10 18:51:38 +00:00
Brian Wilkerson 36d8e3a9ba Fix more places where hardcoded types need to be made non-nullable under NNBD
Change-Id: I16dbabecdef743b291a4ae85414e95ffa533d723
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-10 17:52:47 +00:00
Paul Berry 63001295c0 optionally report scanner errors before parsing
The fasta parser handles error tokens produced by the scanner
but the old parser expect error tokens to have been already
translated into error messages. This updates the analyzer scanner
to optionally translate scanner errors.

Change-Id: I62383965285511c93e8fbf6a4cada97e9e4e3c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102143
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-10 17:49:57 +00:00
Brian Wilkerson 130ad1bcf9 Stop reporting some errors when constant evaluation produces a valid object with an unknown state (issue 36873)
Change-Id: I1bf9c0aebaee24ab0c9e2b40c9881d478e33f87c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-09 18:45:01 +00:00
Brian Wilkerson d1a5eb5900 Fix the special casing of binary operators with primitive types when NNBD is enabled
Change-Id: I36f7f63b26eb3ea87efbe7af96d2134ea6402158
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-09 18:44:12 +00:00
danrubel b4e2c0246c update parser to handle leading error tokens
This is the first of several CLs that move error tokens to the head
of the token stream so that parser handling of error tokens
can be simplified and less error prone.

In this particular CL:
- update parser to handle error tokens at the head of the token stream
- remove several places that analyzer was preprocessing error tokens
   now that the parser handles them

Change-Id: Iddf60ab2879567a345a692b64043bd42f1871947
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-09 18:36:31 +00:00
Konstantin Shcheglov 678f4bb926 Give featureSet to analysis options to fix resynthesis tests.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I757327377b3fb2b8e945f0938d5d523f83decfaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101940
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-08 23:58:10 +00:00
Paul Berry 1407e59079 Add preliminary NNBD support to the summary linker.
Change-Id: I256d66333d9715ed720bd6ea87d21fd00e17635a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101900
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-08 22:35:49 +00:00
Paul Berry 34d2fd42bd Add summary deserialization support for nullability.
In a follow-up CL I will add nullability support to the summary
linker.

Change-Id: I99f3dce1a695da65c7c09c11e73462c93aeb637f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101882
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-08 22:30:39 +00:00
Brian Wilkerson 147523b744 Add failing tests of operator semantics under nnbd
Change-Id: I3a3f366083d8b1e68a78670b199864172d43cc35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-08 21:45:59 +00:00
Paul Berry 39858b1225 Remove CompilationUnitImpl.isNonNullableLibrary
And plumb FeatureSet into more of the analysis engine.

Change-Id: I40f7061d48c5eb2a597f95a32738bd3133fe21d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-08 21:36:59 +00:00
Paul Berry 51fe641e82 Create a SynchronousSession class.
In the long term this class will take over much of the role played by
RestrictedAnalysisContext.  For now it is simply a container for the
analysis options, declared variables, type provider, and type system.

In follow-up CLs I will plumb this object through various parts of the
analyzer, especially the LinterContext; this will enable the
canBeConst... methods to be moved into SynchronousSession, and that
will allow us to stop creating a LinterContext in
BestPracticesVerifier.

Change-Id: I7ac2d386c10d2e5339d9715848b185c163e1f858
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-08 19:57:31 +00:00
Brian Wilkerson f80f0bfcfd Reland "Implement the type Never"
This reverts commit 78e50a5f9b.

Change-Id: I2ec4cdcfda4a6d199308a3b25a2ed0792e9d9a26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-08 13:26:45 +00:00
Mike Fairhurst a8b6e18b62 Resolve x ?? y as LUB(X!, Y) instead of LUB(X, Y).
Change-Id: I081d8ec153916fb37e2a949d9fa85a6ea778438e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/92390
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-05-07 16:34:17 +00:00
Brian Wilkerson 78e50a5f9b Revert "Implement the type Never"
This reverts commit 40a06c3a77.

Reason for revert: Introduced a bug that is blocking a roll.

Original change's description:
> Implement the type Never
> 
> Change-Id: Icbf407bc19f602c8382946b1e735905cc165c59c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100993
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Iebb5b8327b0be7129298f39b343555b812314abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-07 16:22:37 +00:00
Konstantin Shcheglov 32f146afe2 Fix tests that are probably opinions how something should be resolved.
R=brianwilkerson@google.com

Change-Id: I981feeb3e7a128789b8b7fd38e81e4e19beed22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:28:47 +00:00
Konstantin Shcheglov c331ce69a3 Update extract implicitly typed instance property tests.
The reason when there is a difference in summary1 and summary2 behavior
is that in summary2 we link cycle by cycle, and in summary1 we link
all requested libraries together.

R=brianwilkerson@google.com

Change-Id: I173d37d7a6b6c766c641715c6dbce7c1701139f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:20:46 +00:00
danrubel a83fbc5edb remove unused enable lazyAssignmentOperators flag
Change-Id: I4112fe4ad5a08916d124216753a995d607a9892d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-07 13:06:39 +00:00
Konstantin Shcheglov 259ab698ab Fix for CompilationUnitElementImpl.nameOffset and type alias code range.
R=brianwilkerson@google.com

Change-Id: I90bb0b74ea52eea883ee4c8accb8f2055ba568a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101490
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 22:01:12 +00:00
Mike Fairhurst 7928dbd270 [analyzer] Resolve nullability of generic function types
Change-Id: Ie14ae8844b83f54b5e2c9d1d5424ca8f015bb5d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-06 21:18:59 +00:00
Mike Fairhurst 36c315eacc [analyzer] resolve x?.y to return T?
Change-Id: I3ef319621753364b8d70e79b2ab32d7ec9c1e8d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/92383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-06 21:09:39 +00:00
danrubel 79f4ecf191 report error on const method with empty body
Fix https://github.com/dart-lang/dart_style/issues/810

Change-Id: I5ff31f0cdcc89f9b05b9079698a752b875518da2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-06 20:00:38 +00:00
danrubel 4655f63670 update analyzer.Scanner to track featureSet
Change-Id: Ide1ed3fc83831ab2a957b6e823f515135611614b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101440
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 17:46:52 +00:00
Sam Rawlins 209e135db6 Split out two codes from STRICT_RAW_TYPE
Bug: https://github.com/dart-lang/sdk/issues/36445
Change-Id: Ic716d89b1a6d00945a74c7484f8301403b8ea371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-05-06 16:33:58 +00:00
Konstantin Shcheglov ab5b285f82 Record InvocationExpression.typeArgumentTypes and use it directly, without need to restore type arguments.
Also remove FunctionTypeImpl.recoverTypeArguments because Analyzer
does not need it anymore.

This CL used to replace GenericFunctionTypeElement based FunctionType(s)
with synthetic FunctionType(s). But this is not enough step, because
ideally we want to do this for all FunctionType(s) in invocations. And
this is too big change that affects many parts of Analyzer to do it now.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I180eca03ed249abfafe8d6faa94050a30969f125
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98984
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 15:59:08 +00:00
Paul Berry 81ced1c9bf Make a separate file for tests of implicit_this_reference_in_initializer
Change-Id: I98838dee538158a3776cdeedc195d74f00ece9d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-04 14:50:26 +00:00