Brian Wilkerson
6941d04a6e
Add support for testing the context messages for diagnostics
...
Change-Id: I33d4abc0dcc969f3beecfdc7cbc814e8a486ad1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107142
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-06-24 18:15:38 +00:00
Konstantin Shcheglov
33df2ed85a
Switch flow analysis tests to performFlowAnalysis().
...
So, we can make visitors private.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I8ff98e95b30f4b2d807a7b3d2a63e125d9420669
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-24 18:09:08 +00:00
Konstantin Shcheglov
c13752442c
Fix isNullable / isNonNullable, expand tests.
...
This addresses the issue in a previous CL.
https://dart-review.googlesource.com/c/sdk/+/106620/3/tests/language_2/nnbd/static_errors/equals_parameter_made_nullable_at_invoke_test.dart#30
Change-Id: Ib510ddbfe42c8e6d7cb0c4793a30e050b7e56bd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106962
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2019-06-24 16:53:36 +00:00
Brian Wilkerson
f860ea4b24
Make AnalysisError._contextMessages non-nullable
...
Change-Id: Icf85525d0003a2e6892f385c22128dd477a532ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-24 16:15:26 +00:00
Brian Wilkerson
d307402d49
Summarize the context messages in diagnostics
...
Change-Id: Id03e778cf9bebe9be61d9ded601408121b891097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-24 13:31:52 +00:00
Konstantin Shcheglov
a5d6b81da8
Use flow analysis to report potentially non-nullable local variables that are used before definitely assigned.
...
Not done yet:
1. Switching all unit tests to `performFlowAnalysis()`.
2. Updating the error code and renaming tests.
3. Writing more language_2/ tests.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I0936f2daa4ab1cd91edeaca3eef9544eced5b443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106982
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-23 22:08:43 +00:00
Mike Fairhurst
9b5ddec382
Better FutureOr support, failing test.
...
Change-Id: Ib662286a58fb9389ce1065d87835613f3b899be4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106968
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-06-21 20:09:38 +00:00
Jaime Wren
348e030ce2
Incremental refactoring in index.dart to setup the addition of the missing visitPartOfDirective()
...
Change-Id: I247db3ad49f928aaec0884aa8d99e603d5a26318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106966
Reviewed-by: Jaime Wren <jwren@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Jaime Wren <jwren@google.com >
Auto-Submit: Jaime Wren <jwren@google.com >
2019-06-21 19:15:18 +00:00
Konstantin Shcheglov
44c136423c
Report DEFAULT_LIST_CONSTRUCTOR_MISMATCH only in opt-in libraries.
...
R=brianwilkerson@google.com
Change-Id: I8c2a0e6742af85c00db04a5a7a94f3b91b9cee13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-21 17:36:10 +00:00
Paul Berry
53a905cde1
Introduce function parseFile2.
...
This is similar to the existing `parseFile` function, but it is more
efficient, and it supports the same parameters `featureSet` and
`throwIfDiagnostics` as `parseString`.
Change-Id: I4b9ecc36a137cc1c99e671e379f00afa3942c9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105542
Commit-Queue: Paul Berry <paulberry@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-21 16:08:07 +00:00
Konstantin Shcheglov
48fa94cfdd
Report MISSING_DEFAULT_VALUE_FOR_PARAMETER only when NNBD is enabled.
...
It works now, because we consider types in opt-out libraries as S*,
and so far TypsSystem.isPotentiallyNonNullable(S*) returns false,
because TypeSystem.isNullable(S*) returns true. But I think this
is wrong. The spec says:
We say that a type T is nullable if Null <: T. This is equivalent to
the syntactic criterion that T is any of:
<cut>
- S* for some S where S is nullable
<cut>
So, we currently say that `int*` is nullable.
But this is wrong - `int` is not nullable.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I87340fbed23cebd3d68c92579b7d1785b2fc097a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106952
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-21 15:53:17 +00:00
Konstantin Shcheglov
bd1ffcb2bd
Support for type formals in function LUB.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I5576db2279810bf1e4fc4a73870f60ca50166ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-21 14:35:27 +00:00
Konstantin Shcheglov
75b469fe17
Build summary2 in DDC only when it is fully enabled.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I3bbfbc743e7e1e6908cf2bed465fb844a70fe78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106944
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-20 19:29:14 +00:00
Konstantin Shcheglov
85a4fdb81a
Report an error when a non-nullable top-level variable is not initialized.
...
Change-Id: I2e5e33c01d5f2c10d41b7e2f76e93eaacadffff6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106762
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-06-20 18:25:11 +00:00
Konstantin Shcheglov
a600e97cae
Don't compare typeArguments for FunctionType(s) equality.
...
Change-Id: I9245de1cc16f912af2141dee34b03f401d89a534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-20 06:07:37 +00:00
Konstantin Shcheglov
c5567c0031
Abstract FlowAnalysis from concrete types of nodes and elements.
...
R=paulberry@google.com
Change-Id: I8a42eb260d2c99c4ca24cb8b9059c1d22f9430e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106683
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-06-19 22:51:11 +00:00
Paul Berry
01dcec46e7
Refine type of ClassTypeAlias.declaredElement.
...
This is an API change, but it's non-breaking, because
ClassTypeAlias.declaredElement has always returned a ClassElement; its
return type simply didn't reflect that fact.
Change-Id: I45bcfe1b371953e86f9690b7727be89a835841a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106681
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-06-19 20:23:50 +00:00
Konstantin Shcheglov
3c596e802b
Report an error when a potentially non-nullable local variable is not initialized.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Ie1d148ff584c202edc334659eeb4f792bb8773d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-06-19 18:07:56 +00:00
Konstantin Shcheglov
5469d61e18
Tests for isNullable() and isNonNullable() and type parameters.
...
R=brianwilkerson@google.com
Change-Id: I120363de7067be8665995bbe2353f29240c9b961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-19 16:38:45 +00:00
Dan Rubel
99acf35ede
fix indexed super constructor
...
This fixes a bug where the AstBuilder fails
given a constructor of the form:
class C {
C() : super()[];
}
In the process, 2 buildInitializer methods were extracted from
the AstBuilder.endInitializers method.
Fix https://github.com/dart-lang/sdk/issues/37285
Change-Id: Icacf28b2ed0eff9b7168c97ee0c03d78e5fcd68b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-06-18 17:59:35 +00:00
Konstantin Shcheglov
143e5ef556
Revert 'Import Library' quick fix changes.
...
This basically reverts https://dart-review.googlesource.com/c/sdk/+/103921
because internally IntelliJ does not provide module dependencies yet.
Change-Id: I7717b2841bf3d6391b991875a594c6df9e246ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106482
Reviewed-by: Ari Aye <ariaye@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-18 17:31:56 +00:00
Konstantin Shcheglov
4adaa1fd56
Remove unused LinkedNodeType fields.
...
R=brianwilkerson@google.com
Change-Id: Ib5e03a29db74d2e0ecce78039a60c9047ae720a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-18 16:51:14 +00:00
Konstantin Shcheglov
770675b668
Fix for naming constructor with missing name.
...
R=brianwilkerson@google.com
Change-Id: I89ef01033c9e14417286e5ea95d2d88e1c498982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106425
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-18 03:43:38 +00:00
Konstantin Shcheglov
792a3d561a
With summary2 the 'nameOffset' for directives in the offset of their keywords.
...
R=brianwilkerson@google.com
Change-Id: I2cade95e4fb876096ec299d45665fd51a8193bd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-17 17:49:21 +00:00
Brian Wilkerson
f897a940c1
Fix minor nit in documentation
...
Change-Id: I0a75ecce970754b036f2af0a065aa392547dae7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-17 16:19:09 +00:00
Paul Berry
9a2eecf67f
Fix parseString: ensure that CompilationUnit.lineInfo is set properly.
...
Change-Id: Id81338c1021f9548f2c3f24931baf1e45ac1b18b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106320
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-06-17 16:10:29 +00:00
Paul Berry
43264f5f97
Add missing CHANGELOG entry for parseString
...
Change-Id: Ieb293ac02d97cf454231a27a82bf9dade567ada5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106321
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-06-17 16:07:49 +00:00
Konstantin Shcheglov
2a240ddab9
Don't create accessors/fields typed as Impl.
...
DDC code generator copies these lists using toList(), so inherits
their reified types, and then fails to add a PropertyAccessorMember,
which is not an Impl.
R=brianwilkerson@google.com
Change-Id: Id26ef7bcea07b9956ebf7487883fbbf9f92cf7ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-17 15:59:50 +00:00
Konstantin Shcheglov
df8e0aff6c
Use AnalysisDriver.useSummary2 in FileSystemState.
...
R=brianwilkerson@google.com
Change-Id: Ie64f05a522d08c1fe779ccc78fbfe25ad52ec422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-17 15:59:46 +00:00
Konstantin Shcheglov
b92c287fd7
Use StateError in LegacyTypeAsserter.
...
AssertionError does not print on the console its message, at least in
IntelliJ. Also tweak tests to use throwsStateError.
R=brianwilkerson@google.com
Change-Id: Ifbe2ed0b1d3deba1feaecc7c462f470e8608b70c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106204
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-15 19:45:51 +00:00
Konstantin Shcheglov
7f0519721e
Use unit featureSet during linking.
...
This fixes NonNullOptOutTest.test_nnbd_optOut_late with summary2.
R=brianwilkerson@google.com
Change-Id: I9939ca92daaed349491df3463394164ead5d626b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106205
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-15 19:39:31 +00:00
Brian Wilkerson
c5cd37e727
Address more documentation feedback
...
Change-Id: I2e55e146495ab8bd59e87cff9915ee84c99da8b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-15 15:30:40 +00:00
Konstantin Shcheglov
d342402c80
Always ensure TypeProvider, even with external summaries include the target library.
...
There is at least one case (but not many) when this happens internally.
R=brianwilkerson@google.com
Change-Id: Ic940cb836f58467d40ed7b31cb8bb43cf12eee50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106165
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-14 21:57:34 +00:00
Konstantin Shcheglov
d4cad0fff1
Restore element and typeArguments for typedef-based _FunctionTypeImplStrict.
...
R=brianwilkerson@google.com
Change-Id: Ibc7fc53aba10661236f0d3f3361bf7f05882cc5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-06-14 21:55:20 +00:00
Mike Fairhurst
2eebc1024c
Refactor non-bool expression checks
...
Change-Id: I4da7abe3293c4dbf7218f3a276cf9418b3d14f19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106000
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-14 21:50:30 +00:00
Mike Fairhurst
c246fa1f2b
Fix #36956 , report undefined getter for uses on Null.
...
Bug: 36956
Change-Id: I5b8f40f5c1f7fd9304b02054e3d8d7d607c12af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106021
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-06-14 21:29:29 +00:00
Mike Fairhurst
fa885b3eae
report undefined operator instead of method for bad +=.
...
Change-Id: Ia28fdb47c80768b011b05edc1e3e7b832f9335e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105971
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-06-14 18:56:07 +00:00
Brian Wilkerson
a02d6de474
Update documentation based on addition feedback from the documentation team
...
Change-Id: If028f6f3a81a827537642da9f261001588f67bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-14 17:09:37 +00:00
Paul Berry
e3004dae0d
Fix hint override_on_non_overriding_setter
...
Change-Id: Id0b9cf7fcfb972b77181356f0d70275ce1e3be1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106100
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-06-14 14:58:27 +00:00
danrubel
6bd64ff8b2
cleanup StringScanner references
...
Change-Id: Ic75305c7a76860c5b96032d4f8c8fff695006f22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-06-14 13:39:47 +00:00
danrubel
1a9801e9fa
mark ExperimentalFeature bogus_enabled and bogus_disabled as deprecated
...
... and update comment and test output to indicate how files should be
regenerated from tools/experimental_features.yaml
Change-Id: I369b93c35b91f7a93c915f0abf9cebdd00c13f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106003
Commit-Queue: Paul Berry <paulberry@google.com >
Auto-Submit: Dan Rubel <danrubel@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-06-13 21:30:05 +00:00
Konstantin Shcheglov
41a23711d9
Support for LinkedElementFactory in getLibraryElement().
...
R=brianwilkerson@google.com
Change-Id: I82d613d33beaaa8c46a718996993fd4c8e584d3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105966
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-13 17:50:30 +00:00
Konstantin Shcheglov
f9c2e3856b
Store exactly GenericTypeAliasElement with FunctionType(s).
...
R=brianwilkerson@google.com
Change-Id: I128eaf7852eb23031d843e1d970cf62b6c975fc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105967
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-13 17:50:17 +00:00
Mike Fairhurst
8a5495700a
Clean up null aware access test
...
Change-Id: I893b4cea44278d114160331b69d06d92d0e56cf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105735
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-06-13 17:04:06 +00:00
Dan Rubel
c530c333bb
Update null-aware nnbd "?.[" operator recovery
...
This sets the "?.[" endGroup to "]" for proper token stream structure
and parser recovery.
Change-Id: Ie4147ac5dedcc273ea6cfda6dafc5d91e892b1a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-06-13 16:53:26 +00:00
Dan Rubel
45f39fe70d
update scanner/parser to handle null-aware index operator
...
This adds support for the nnbd `?.[` operator as specified in
https://github.com/dart-lang/language/pull/293/files#diff-dbeaf678924df9f8a2ca9f5d12e26d3eR11513
Change-Id: I11547cf875439fef9fe22d4f4ac5ab912b3759d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-06-13 16:53:26 +00:00
Brian Wilkerson
90b55959a4
The name of an extension is optional
...
Change-Id: I6d73538e2ae2d90b0347c4ee03df4422a442ab75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-06-13 16:28:21 +00:00
Brian Wilkerson
39c629f4aa
Clean up uses of deprecated methods in legacy type asserter
...
Change-Id: I7f7288d57e69a488728dc81e5af5476a27d3dbc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105860
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-06-13 16:12:00 +00:00
danrubel
d6f5a245b2
parser error token cleanup
...
This removes one location where ErrorToken processing is no longer needed
in the parser, and updates the analyzer parser tests to use scanString
rather than instantiating the scanner directly.
Change-Id: I399d771004af7f9fe25d19c1065fbfd425416edc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-06-13 14:30:10 +00:00
danrubel
8adde6b603
make extension declaration name optional
...
This CL updates the parser to parse extension declarations where
the extension name is omitted. For more details, see
https://github.com/dart-lang/language/pull/303/files#diff-9b84d2e3c88265bde2eb43544ddb757dR66
This change explicitly does not handle the case `extension on on on { … }`.
A subsequent CL should either make `on` a builtin
or add more lookahead in the parser to allow this edge case.
Change-Id: Ided821192770f88a51a3300fed8cb0fdef9eea3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-06-13 14:29:40 +00:00