Commit Graph

3034 Commits

Author SHA1 Message Date
Jaime Wren 920ddae937 Re-write of the computation of the context type for code completion.  Instead of passing a parent and child node, a parent node with an offset is passed.  The primary purpose of this change was to fix a bug with argument lists which is close to being fixed.
I will follow up with some additional fixes and tests for map and list literals.

Change-Id: I1a26e8f900dcf13402385a49e8f3538c5d1b39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151030
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-15 18:19:42 +00:00
Konstantin Shcheglov 48f2d10d3e Deprecate ClassElement.hasReferenceToSuper
Change-Id: Ie94d8e2b0be6ccb30c7ca59c80da2832cfed3689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151168
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-15 17:45:06 +00:00
Sam Rawlins b0d4c359d8 Move tests for 4 codes to diagnostics directory.
Also add some tests for function-typed field formal parameters.

Change-Id: Ia6cb23c15e695a540ac3c6df0a7af8110a8fc1f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-14 22:12:07 +00:00
Sam Rawlins 32a93e2147 Analyzer: Remove error on class-used-as-mixin referencing super
Fixes https://github.com/dart-lang/sdk/issues/34806

Change-Id: I1cfd0b9c0699734b172aa62f7a04ab533a6cd03f
Fixed: 34806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151099
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-13 15:11:25 +00:00
Sam Rawlins 9f6c372228 Analyzer: forward const constructors to mixin apps as const
Fixes https://github.com/dart-lang/sdk/issues/41072

Relevant text from spec:

> If $S_q$ is a generative const constructor, and $MC$ does
> not declare any instance variables, $C_q$ is also a const
> constructor.

Relevant language tests:

  language_2/mixin_constructor_forwarding/const_constructor*

Change-Id: I8ad9e9dd3907b5dd29aa8f10aab6ec604a1aaa4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150682
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-11 21:05:29 +00:00
Konstantin Shcheglov fd60cbc21f Issue 42190. Fix PackageMapUriResolver and path with non-ASCII characters.
Bug: https://github.com/dart-lang/sdk/issues/42190
Change-Id: I4a5fea9f808a08d547b7b6e97ba8b93ee9dd16e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-09 16:32:16 +00:00
Sam Rawlins 66e2b22d14 Analyzer: report conflicting extension type variables
Fixes https://github.com/dart-lang/sdk/issues/42216

Report when an extension declares a type parameter with the same name as the
extension.

Report when an extension declares a member with the same basename as the name
of any of the extension's type parameters.

Move tests into diagnostics/.

Move tests for RECURSIVE_INTERFANCE_INHERITANCE.

Change-Id: If19041571008b9b14122d9ff458d1d30ea0ff034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-08 05:44:12 +00:00
Sam Rawlins 8020a0f286 Analyzer: move built_in_identifier_* tests
Change-Id: I9802a055d40ac20f928e4b6e68fd0aecd0f9bc74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149665
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-02 16:52:12 +00:00
Paul Berry 930cae0f13 Revert "Remove DartSdk.useSummary."
This reverts commit a2c3ecabce.

Reason for revert: Breaking change to de facto API

Original change's description:
> Remove DartSdk.useSummary.
> 
> R=​brianwilkerson@google.com
> 
> Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

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

Change-Id: I9998bedb74ea940371f18ac7dce42b2f5dcc3b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149687
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-02 15:20:32 +00:00
Konstantin Shcheglov a25f8e54ac Extensions are always enabled, merge corresponding tests.
Change-Id: I2a2603ea506baaf95ce26da656cee965faf094c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 16:47:36 +00:00
Konstantin Shcheglov a2c3ecabce Remove DartSdk.useSummary.
R=brianwilkerson@google.com

Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-30 19:07:32 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Parker Lougheed 66e2339142 [pkg/analyzer] Address prefer_final_fields lint
Change-Id: I737502b4bbef575ef6d9e0a16c12f43365a5e093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 19:00:56 +00:00
Konstantin Shcheglov a849f66762 Extract INSTANCE_MEMBER_ACCESS_FROM_STATIC tests.
R=brianwilkerson@google.com

Change-Id: I84be2de6602e910912984eba11b700ea2bc4a831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 18:00:17 +00:00
Johnni Winther 383a8ea857 [cfe] Initial support for external fields.
Change-Id: Iccee87f40df395c928dc1a9dc81ddad8813a5000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147906
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-05-14 18:34:06 +00:00
Sam Rawlins b9e10e3870 analyzer: Remove unused imports
These were previously undetected due to https://github.com/dart-lang/sdk/issues/38784

Change-Id: I546f698d992142f5e1d1260fba1cfd4a5308a0d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-12 23:45:24 +00:00
Paul Berry 275b922ee8 Revert recent parser fixes
Commit 1f9b5c1996 causes tests to fail
in angular when rolled into internal sources; the other two commits
need to be reverted as well to avoid merge conflicts.

This reverts commit 1f9b5c1996.
This reverts commit c40b24da48.
This reverts commit 96df1f9e6c.

Change-Id: Ic4e55181ef60e825ce4409a9a9528ecbf19c39c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147822
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-12 22:02:09 +00:00
Jens Johansen 96df1f9e6c [parser] Add ErrorToken for ignored (unmatched) end parenthesis, brackets etc
Change-Id: Idb57295700988d71321743af9782134b02562311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146240
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-05-11 14:46:47 +00:00
Konstantin Shcheglov 81780821e8 Extract FunctionExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I363f0bfe91328c2729fe268d2dcb79f61d51b91c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147338
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-09 18:19:09 +00:00
Konstantin Shcheglov eaf46c9ccf Remove unused _isInConstInstanceCreation.
Change-Id: Id989fd41a3249fc35147b5be43c935bc5a2ce340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-30 23:46:36 +00:00
Jens Johansen c670ae42b0 [analyzer] Add test for parser fix of bang question index
This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/141886 adding the
requested test to analyzer.

Change-Id: Ibb34886943b6a80c218212acad17b93b83faadb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142999
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-04-16 06:36:10 +00:00
Konstantin Shcheglov 69526e6512 Depecate many AnalysisOptions fields.
Change-Id: Ibe219527d9abdad38bb99390d3023e7ee6bb8420
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143251
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-15 18:36:52 +00:00
Konstantin Shcheglov ec3dd52462 The type 'dynamic' is defined in dart:core.
This makes fixes to analyzer and update the test for updated spec.

Change-Id: Ie5222bcf9056d5cbb7f18437dec04d5af21ff314
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-13 17:55:36 +00:00
Sam Rawlins 2c420267b7 analyzer: Do not allow errors to be ignored inline. Fixes #27218
Change-Id: If37dabba3ec18a9f79f44c4ea38d6920a4013019
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140142
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-04-10 17:16:24 +00:00
Konstantin Shcheglov 92f6b03513 Update ClassHierarchy for legacy support, record errors.
Change-Id: I6a07a750293fa0a16c5b101142e023c8105a85aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-06 23:07:37 +00:00
Konstantin Shcheglov e5e9bc74db Allow potentially constant type expression in 'as'.
Change-Id: I6790816daa0c02dd3d12ffd4aba00f514bf03922
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142449
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-06 17:06:14 +00:00
Konstantin Shcheglov bac08fb339 Implement interfaces subtyping check using allSupertypes.
Change-Id: I43a4b98bae913895c7e176dd24a17fc5df7666e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-06 00:20:10 +00:00
Konstantin Shcheglov 806ff47b0f Match InterfaceType(s) using allSupertypes.
Change-Id: I6694f4c4c0df74dd1d7c1bc9f00792bc419c83bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-04 00:06:27 +00:00
Konstantin Shcheglov be76b03b1a Update MockSdkElements to create only migrated SDK.
Also update TestAnalysisContext to set AnalysisSessionImpl.

R=brianwilkerson@google.com

Change-Id: I21aafdc602ab049280c199b990ec9df5563fa494
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-03 17:08:07 +00:00
Jens Johansen cd629791d2 [analyzer] Regression test for constructor with operator name
This is a follow up to
https://dart-review.googlesource.com/c/sdk/+/142161

Change-Id: I735854eb74e064ad714d69f8280532d1448fd914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142153
Auto-Submit: Jens Johansen <jensj@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-03 14:09:35 +00:00
Konstantin Shcheglov 6ef554958f Remove typeParameterType() and replace with typeParameterTypeStar() mostly.
R=brianwilkerson@google.com

Change-Id: I66f9323859ecaba9f3f3270132b670c3fe596deb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142069
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-02 15:54:09 +00:00
Konstantin Shcheglov a373aa7ce1 Convert GenericInferrer tests to non-nullable.
I.e. print types with nullabilities, and use 'none' types in tests.

R=brianwilkerson@google.com

Change-Id: Ia53885ebe7077b0de12e01ac5171711ca8b57e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 22:36:18 +00:00
Konstantin Shcheglov 3af491ecd8 Move additional tests and remove GreatestLowerBoundTest.
Change-Id: I463e4dacb5226d417e6ee13b53540c7c6b76cfc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 21:38:48 +00:00
Konstantin Shcheglov 191be51124 Extract GenericInferrer and type schema.
Change-Id: Ic306342609911e3e232dbf95f30b60cff94c34be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 20:54:48 +00:00
Konstantin Shcheglov 0e5b596e0d Extract GreatestLowerBoundHelper and LeastUpperBoundHelper.
Change-Id: I1e10798d2dfe231ab5e6fb87a5eed42e81e43998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141905
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 17:41:42 +00:00
Konstantin Shcheglov 37773d39be Make 'covariant' parameter required in tryMatchSubtypeOf().
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7a30e886c8fe2abdc5402d0d9da283cdd8f32c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141913
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 15:36:45 +00:00
Jens Johansen 4ab3bda5db [parser] Change recovery for constructor; report errors in bad constructors
Change-Id: I3d656afce4a3ec14c7c099893a434abba3945ebf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-27 11:57:56 +00:00
Konstantin Shcheglov fc91636703 Fix for crash when FieldFormalParameter in a local function has annotations.
Saw this in the crash reports.

R=brianwilkerson@google.com

Change-Id: I890592b264a3c33df80d89b45ad55ebe3fdf0c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:07:03 +00:00
Mike Fairhurst 3095a082cd [analyzer] Add an API to get a language comment token off a unit.
Change-Id: I377fdc44d5e514d6d9a601b3947c3908e5a4497a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140768
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 03:47:57 +00:00
Konstantin Shcheglov 70567aa8df Report an error when a null-aware index expression in legacy library.
Change-Id: I931445a748d88bf7a1416b880de3299b4a3e19bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140774
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-24 20:55:47 +00:00
Sam Rawlins 9dfd0127da Do not report super-constructor errors on external constructors
Bug: https://github.com/dart-lang/sdk/issues/27218
Change-Id: I1772cc850b21e97694eaa1852893993f6d4037b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-03-17 18:34:04 +00:00
Konstantin Shcheglov ef6c7efc9f Issue 40941. Report FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER.
Bug: https://github.com/dart-lang/sdk/issues/40941
Change-Id: Ica0bbbdeee447c410cbfd64aea1a643711d21655
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139322
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-12 21:04:06 +00:00
Konstantin Shcheglov cdac6f614c Issue 40837. Fix for invalid function expression flow analysis.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40837
Change-Id: Id7021aa6b54fede6af2d03f51fd1d53445d174c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139149
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-12 15:33:02 +00:00
Konstantin Shcheglov f5a6554635 Move 'thisType' to ResolverVisitor.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/40932
Change-Id: Ie0fd3554fcb1f8baa3944bd6805ac72f0b76da61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-10 15:50:20 +00:00
Konstantin Shcheglov 83378633e1 Add the attachment with the content of the file being analyzed.
Change-Id: I75b1c61e2d04cd5e03ef4375e97ef3c9f4add874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138384
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-10 04:57:20 +00:00
Konstantin Shcheglov 1f92f1d903 Issue 40865. Fix for parsing documentation comment of an annotatied EnumConstantDeclaration.
Bug: https://github.com/dart-lang/sdk/issues/40865
Change-Id: Ida37b7140d8f2366d0f8c6d7e073f0ef92d95369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138246
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-04 16:18:15 +00:00
Jens Johansen 47d462e8b1 [parser] Better handling of nullable types vs conditional expressions
Fixes #40834

Change-Id: I2fdad5a383c1873b1dd782b70e2f1e3ab8664b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137960
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-03 09:49:57 +00:00
Sam Rawlins e687b62ffe Improve recovery on yield not-in generator; Improves #32967
Fix is inspired by very similar recover for `await` in synchronous
function, like `looksLikeAwaitExpression` and `endInvalidAwaitExpression`.

Change-Id: I50bf0c1e73c31551b94de29d78fd3d449c30fd20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136920
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-02 17:29:22 +00:00
Konstantin Shcheglov 6a9987838f Issue 38990. Fix for function typed formal parameters, trailing question, endToken.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/38990
Change-Id: Iaf58a6588f5098168f59edba1c82397dcf7077ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137736
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-28 19:10:06 +00:00
Konstantin Shcheglov fabe842b8d Issue 39939. Fix for-in when iterable is Never.
Bug: https://github.com/dart-lang/sdk/issues/39939
Change-Id: I83a0c8a0d3b2bed1859f064d71c9c70a19497919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-27 21:37:43 +00:00