Commit Graph

7628 Commits

Author SHA1 Message Date
Konstantin Shcheglov 03776172c1 Read VariableDeclaration type during checking for implicitly typed.
R=brianwilkerson@google.com

Change-Id: Ide32d69775df15aa3524893734a11dc7299bdc72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 23:22:33 +00:00
Brian Wilkerson d5eba9b77d Remove error if a final field without initializer is marked as late
Change-Id: Ibc81d71bc6ec2d223583dcbcb39b2311a49eda0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 23:06:49 +00:00
Konstantin Shcheglov a43d36cdd9 Support for '===' and '!==' tokens.
R=brianwilkerson@google.com

Change-Id: I15edd0d2f34e4dd3e88960681c37bf469ee34472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101079
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 21:56:00 +00:00
Konstantin Shcheglov 0586be25a4 Read partOf directive metadata lazily.
R=brianwilkerson@google.com

Change-Id: Ida31471bde95b6693a357bcdf6aa94cc96eb587e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 21:37:25 +00:00
Paul Berry 0950a540d7 Convert summary_common.dart to triple-slash comment style
Change-Id: Ife2401515d2a755082a5021631880f8d79e637c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101074
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 21:37:18 +00:00
Paul Berry 14d548f239 Add a toString() method for FeatureSet
Change-Id: Ie15939d50410c7a9a4490a29e332be7d9bd5f0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101073
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-02 21:30:43 +00:00
Paul Berry e25aefc8d6 Consolidate all NNBD enables in resynthesize_common.dart.
I elected not to provide an `sdkVersion` argument to FeatureSet for
these tests, on the grounds that if any new features are added to the
SDK before NNBD, we want to make sure that those features are
compatible with the NNBD summary behavior.

Change-Id: I62e383e903b5756dcbb8cb498e71c4e739731d3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101070
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-02 21:29:13 +00:00
Konstantin Shcheglov 48a7e24e39 Store lineStarts with units.
R=brianwilkerson@google.com

Change-Id: I570b172f6feae88c122536e4032860b7c9e01ebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101077
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 21:08:34 +00:00
Konstantin Shcheglov 70e00c9a37 Handle ClassTypeAlias without valid Function.
R=brianwilkerson@google.com

Change-Id: Ibc160658b75f7d5a450548e12aa5dc96be674f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101072
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 21:01:30 +00:00
Paul Berry a334395edf Switch to using FeatureSet in summary tests
Change-Id: I16b13a2509836485417013da48d5b1ae4c92f618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101069
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-02 20:46:13 +00:00
Konstantin Shcheglov dd1ae4c2d8 Fix the order during building library scopes.
We should add local declarations to the export scope first.

R=brianwilkerson@google.com

Change-Id: I0f918be9ea16519c5670fb24236c85d1755f9eea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 20:13:50 +00:00
Brian Wilkerson 3646be6fb5 Add a previously missed test and cleanup test names
Change-Id: I441c0ce4e636480c3e544a292a3620cbb4a745d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 18:00:59 +00:00
Konstantin Shcheglov 946c38d881 Build local elements for variable initializers.
R=brianwilkerson@google.com

Change-Id: Ice81c47a812ec2421cb6516b6fbec340ed239d22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 17:20:11 +00:00
Brian Wilkerson 5bac4d9b0c Reland "Add support for recording context information with analysis errors, with one example"
This reverts commit b9bf239c65.

Reason for revert: The angular and angular plugins have been updated so as to make this safe.

Original change's description:
> Revert "Add support for recording context information with analysis errors, with one example"
> 
> This reverts commit 6114435ea5.
> 
> Reason for revert: Broke angular and angular_analyzer_plugin
> 
> Original change's description:
> > Add support for recording context information with analysis errors, with one example
> > 
> > Change-Id: Iba1c48163ce264d85a68bcb9f70e5025a7cdbfbb
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100563
> > Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> > Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> 
> TBR=scheglov@google.com,brianwilkerson@google.com
> 
> Change-Id: I275c6e4473de73199ea9b5e490379ba58aec1d43
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100628
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

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

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

Change-Id: Ib1b7e63a459e63bcbf02f26bcf167ddad45295b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 17:07:03 +00:00
Brian Wilkerson 40a06c3a77 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>
2019-05-02 16:31:23 +00:00
Paul Berry 4fd9312586 Convert session.dart to triple-slash comment style
Change-Id: Idb5120b19ed6737b7c41b97327876113f11829d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101065
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 16:31:03 +00:00
Konstantin Shcheglov af4bc38490 Fix for building named function types.
R=brianwilkerson@google.com

Change-Id: Idc0b192579db4189b0335b44d2468f87701b43fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101005
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-02 16:19:30 +00:00
Konstantin Shcheglov 6ac709a2d0 Infer mixin type arguments.
R=brianwilkerson@google.com

Change-Id: I089bd79c52fc345d1e51045221d02c2342dca0d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-02 14:29:51 +00:00
Konstantin Shcheglov 54f9835abf The function type might be null in GenericTypeAlias.
R=brianwilkerson@google.com

Change-Id: Ia7004239b42171a20e724d80c6f0c4c60b1173f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-02 03:53:44 +00:00
danrubel 1682b4aac5 replace parser language version comment processing
This CL removes duplicate language version processing from parser
now that the scanner does this work.

In addition...
- update parser tests to listen for languageVersion scanner event
- remove languageVersion field from CompilationUnitImpl and AstBuilder
- add Scanner.buildConfig for translating a FeatureSet into a ScannerConfiguration
- remove old language version parser tests
- cleanup parser nnbd tests

Change-Id: I6ead6a3ab6d5d424e9a7dfbf69da110e43c63982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-02 00:55:43 +00:00
Konstantin Shcheglov 143ebf1c1c Compute default types for type parameters of GenericTypeAlias.
R=brianwilkerson@google.com

Change-Id: Ifbfa8e240b078285660b80fbb02914bc6666b753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 20:06:39 +00:00
Konstantin Shcheglov 2209d8f0c0 Run VariableResolverVisitor during resolution.
R=brianwilkerson@google.com

Change-Id: I435cc99a249ea940631ea5ddcea5964cca7ddd1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 20:06:26 +00:00
Konstantin Shcheglov a7c0a75442 Disable DeclarationResolver tests with summary2.
R=brianwilkerson@google.com

Change-Id: I83ad273ba2a0862e659f407f5749e7ae11b507c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 20:06:05 +00:00
Konstantin Shcheglov f7b73e9c4b Read linked bundles from ByteStore.
R=brianwilkerson@google.com

Change-Id: I5be61a2d03c57d1b6bd7a765e50b235ef3f8af5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-01 20:05:59 +00:00
Konstantin Shcheglov 2279d88f1f Pass CompilationUnitElement to LocalElementBuilder when building locals.
R=brianwilkerson@google.com

Change-Id: Ib3c3e7fc76e075eeb312b967948ca92b212b6cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100984
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 20:05:54 +00:00
Brian Wilkerson 52608e3174 Convert more tests to DriverResolutionTest
Change-Id: Ib1c3018362f868626d788bc63ba33e5fe5900d8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 17:02:19 +00:00
Konstantin Shcheglov 49dfd6f4df Build elements for constructor initializers.
R=brianwilkerson@google.com

Change-Id: Ic41e6ec93571f0407184f8b8e8271517e1e1ec59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-01 16:22:39 +00:00
Konstantin Shcheglov f66ef921ac Write and read comment references.
R=brianwilkerson@google.com

Change-Id: If7d0e97ec98cc7ee2a5ac1c664cb296762911a69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100930
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 14:38:38 +00:00
Konstantin Shcheglov b6997deb3e Resolve typed constant initializers separately.
R=brianwilkerson@google.com

Change-Id: Id54b57a40004de0c9adc345e1f944fc89b568e68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100929
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-01 14:19:20 +00:00
Konstantin Shcheglov 2e24a992c7 Support for 'nullabilitySuffix' in linked types.
R=brianwilkerson@google.com

Change-Id: I08853e2a699cc2270f120247424503a2c5a7cac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 23:02:02 +00:00
Brian Wilkerson 481d6b9f30 Fix the windows bots
Change-Id: Ia3f796a174c03912975b37fb9904eea0a05f04c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100926
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 22:53:22 +00:00
Brian Wilkerson a30819a2f6 Add a diagnostic associated with the default List constructor
Change-Id: I41ba3e34c2f209c27bf83015feed0a2ce7918ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100789
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 22:24:02 +00:00
Dan Rubel 7cb1365f7f replace individual scanner flags with scanner configuration
Change-Id: I3d4522a8bcabcbc139de09e08d44baf2eeae4a59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100882
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 21:29:02 +00:00
Dan Rubel a20e7eee15 update scanner config based on language comment
... and add ScannerConfiguration.nonNullable const

Change-Id: I6917c535e40e94cb591f2c4f5582dc0127be17f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 21:28:02 +00:00
Konstantin Shcheglov 26a82dbf38 Support for LibraryElemenet.entryPoint
R=brianwilkerson@google.com

Change-Id: Ia0d4f26241fe26dbfae8d15e7c110c9e9adf5da3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100891
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 21:05:05 +00:00
Konstantin Shcheglov de1966db11 Separately handle InterfaceType and FunctionType while collecting free type parameters.
FuntionType(s) with summary2 are not Element + typeArguments,
they are just types.

R=brianwilkerson@google.com

Change-Id: I52887e6b31cd4e2f9749ff67943159f3c93722fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100888
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 20:59:52 +00:00
Konstantin Shcheglov 46847f2239 Store super-invoked names for mixins.
R=brianwilkerson@google.com

Change-Id: Ifd0ae3fed1ca12cee2a14067b6accfae8407ea62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 20:01:01 +00:00
Brian Wilkerson 5152269d28 Convert another test class from ResolverTestCase to DriverResolutionTest
Change-Id: I621f55712f19be3b0d7ff4aadf1420f55d2ef53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100824
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 17:21:01 +00:00
Konstantin Shcheglov 25daff618d Support for 'late' keyword.
R=brianwilkerson@google.com

Change-Id: Ia731b56ab67d0d33af9a8ab4786d9204544a57ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 16:58:44 +00:00
Konstantin Shcheglov ae97367e4a Support for 'required' keyword and default parameter kinds.
R=brianwilkerson@google.com

Change-Id: Ia5e62e190812c321f2fb06c045f153d9a6b6833d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100826
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 16:58:38 +00:00
Konstantin Shcheglov 0213a31527 Fix for default parameters without name.
R=brianwilkerson@google.com

Change-Id: I2084c6933a4c7b5f1ecf21e5ab3a15e30b718346
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-30 16:58:31 +00:00
Dan Rubel 4215dc8365 cleanup analyzer warnings
Change-Id: Ia5282ebb910babc47f9e2012bb5a5bc616846568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100881
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 15:56:08 +00:00
Konstantin Shcheglov ea708965ab Find type alias self-references during linking.
Elements are not available for FunctionType(s), and during linking
we have the whole library cycle, so can compute self-references.

R=brianwilkerson@google.com

Change-Id: I2e145c4efae77ac5dbff2782f4b3590339187c0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100796
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 14:41:58 +00:00
Paul Berry afe805fa6e Fix hint unused_shown_name
Change-Id: Iefad837b2ef5271b8698872c3fcdd01b936bd6c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100860
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 14:20:23 +00:00
Konstantin Shcheglov 156de21785 Adapt OptionalConstMixin to summary2.
R=brianwilkerson@google.com

Change-Id: I0648413fb4494e912c328c135677735b4faabbbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 14:20:03 +00:00
Konstantin Shcheglov 0bfe57da52 Store unresolved URIs, but as empty strings.
R=brianwilkerson@google.com

Change-Id: I79e831765f1f35f728a6dee8f85ce46c6ff11fa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 14:12:21 +00:00
Konstantin Shcheglov ca3d908719 With issue 36262 fixed, remove the workaround.
R=brianwilkerson@google.com

Change-Id: Id2f4c8f539290013aab2dc5afe7a8551eaa5a72e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100797
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 14:11:58 +00:00
Keerti Parthasarathy f3e1480b52 Update manifest checks watnings and corrections
Change-Id: Ic88114cc5472c58c8a848f4c5cc0cb6e7eedbecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-30 01:39:47 +00:00
Konstantin Shcheglov 532226f024 The library is synthetic when its defining unit is synthetic.
R=brianwilkerson@google.com

Change-Id: I9afbea2214e07f968deb74b490a27090766f8823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100794
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 00:21:27 +00:00
Konstantin Shcheglov c944328528 Refactor types resolution, compute default types for type parameters.
R=brianwilkerson@google.com

Change-Id: If8b89c611c10c0026ec40773aed2a38a5fb37b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100787
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 21:44:05 +00:00