Commit Graph

7628 Commits

Author SHA1 Message Date
Konstantin Shcheglov 250d931ecc When URI cannot be resolved, the library is null.
R=brianwilkerson@google.com

Change-Id: Icdba4cd1c23b88bdfc11bd9082a79738f3371a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 20:27:56 +00:00
Konstantin Shcheglov 2491767a33 Use correct CompilationUnitElement for annotations.
R=brianwilkerson@google.com

Change-Id: Iad43c3f8cb02bcc165235e3832a569f4dd44c7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 20:27:35 +00:00
Konstantin Shcheglov 4ef18fdb96 Fix nameOffset for Export/ImportElement.
R=brianwilkerson@google.com

Change-Id: If757d8ccbb0bdaed74c2d4268a507bd87854ab05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 20:27:18 +00:00
Konstantin Shcheglov 7873dbdc1d Fix for duplicate declarations.
R=brianwilkerson@google.com

Change-Id: Ie08b441edc30027ec4c4509f6c77b97d4cf8242d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 20:27:01 +00:00
Konstantin Shcheglov 714a082a5d Minimal integration of summary2 into AnalysisDriver.
There are also a couple of fixes for linking, to reduce the number
of failures.

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

Change-Id: I411ac34dd65bafd35adcbf22c1b78869ec0b5e24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99703
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 19:15:52 +00:00
Brian Wilkerson 836efd6520 Add a language_2 test for having an invalid type in an on clause
Change-Id: Ia073e6a85f6f5cc54ecb45ab5d4e11e7976c3134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99701
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 18:35:20 +00:00
Dan Rubel 81e554ea43 parse "required" modifier for NNBD
This updates the parser to recognize the "required" modifier
but always reports an error when it is detected.
A subsequent CL will update the listeners to handle the new modifier.

This also cleans up ModifierContext initialization
and adds a new pseudo-keyword-used-as-type test

Change-Id: I83f9a6b410c2bfb3476e691d3e8482bf7c97b0dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99643
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 17:54:00 +00:00
Brian Wilkerson 7b9ab9f353 Add error ranges to more diagnostic tests
Change-Id: I7c3efc8b4973f84f6b1ccfaf85d1c5655b461ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99446
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-17 16:08:16 +00:00
Paul Berry 3782197e95 Sort summary_common.dart
Change-Id: Id3ce4ab8437de025ce9e7cd754f69a18f18c72b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99642
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-17 15:41:36 +00:00
Keerti Parthasarathy b0c98d57fa Add the new manifest error codes to error codes list
Change-Id: Iaea0edc3d0680c03dec32c5da74399e1b26a399c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-17 15:08:16 +00:00
Dan Rubel ebdefa3f5f add new "late" and "required" modifiers
Change-Id: Iec0acac1bb4280f31bd32297543eceb54f87f1ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 15:01:36 +00:00
Sigmund Cherem 8e73b3c006 Enable ui-as-code features.
Change-Id: I97781ffe5144c4b959cb3cb720e9cd06c22928ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99283
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-04-16 21:29:55 +00:00
Keerti Parthasarathy e7f75e11ae Add more checks for manifest
Change-Id: I1bdfa35fe6ae6d026a913abc95b209f0fe41e2fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99500
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-16 20:33:15 +00:00
Sigmund Cherem 4b7d256a06 Revert "Enable constant-update-2018 by default." and "Update .expect files in pkg/front_end after e9ca6a53"
This reverts commit e9ca6a5335 and d3e00fd35e.

Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-16 20:20:12 +00:00
Brian Wilkerson 73d99df7e0 Report when a potentially nullable type is used in an on clause
Change-Id: I6e9e779d5bb0f37cfd71d4d2dc38c1511c03d59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99484
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-16 19:34:25 +00:00
Dan Rubel 80dd5ca3d4 new "modifier out of order" error code
This replaces the const-after-factory error code
with a more general modifier-out-of-order error code.

Change-Id: I71baf2c96656241475c344cb33b887d8e0d456fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-16 19:28:55 +00:00
Konstantin Shcheglov 41e9878348 Unbreak two tests that were failing on Windows.
R=brianwilkerson@google.com

Change-Id: Ib871dcddb5c547ad3b89ef529fb0d739f1cdd30b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-16 17:55:55 +00:00
Konstantin Shcheglov cef1e31284 Rewrite AST for implicit instance creation.
R=brianwilkerson@google.com

Change-Id: I2fc7b75e2d64359c3bd79fdb613f03d01e8211a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-16 17:24:24 +00:00
Paul Berry 457a781bd7 Reland "Do not append ! to type names in tests that exercise NullabilitySuffix.none."
This is a reland of 890d12fa47

Original change's description:
> Do not append `!` to type names in tests that exercise NullabilitySuffix.none.
> 
> Appending `!` is confusing because it suggests a non-nullable version
> of the type.  But the absence of a `?` or `*` suffix doesn't mean the
> type is non-nullable.  For type parameters, the type might or might
> permit null depending on how it is instantiated.
> 
> Change-Id: I3c98ddeb80816cc82e00e2692977e66c9fb51170
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99373
> Reviewed-by: Dan Rubel <danrubel@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

Change-Id: Ifbb3caea8881839e16ac959f962adc831b792ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99448
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-16 16:02:25 +00:00
Konstantin Shcheglov 2b4d27bf6f Fix test_unresolved_annotation_instanceCreation_argument_super.
R=brianwilkerson@google.com

Change-Id: I6a70d9766fe90fc9eb4b7783a3c897c849a1652e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99445
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-16 15:54:24 +00:00
Paul Berry c3428c9342 Disallow UI-as-code in constants if constant-update-2018 is disabled.
Analyzer unit tests exercising the behavior of UI-as-code had to be
replicated so that we could test the behavior both with and without
constant-update-2018.

Note that as of the writing of this CL, constant-update-2018 has been
enabled by default, so there is no immediate functional change.  The
change will take effect if we decide to back out constant-update-2018.

Change-Id: Iff50f4cb834805bec14638220671384c97dea39d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-16 15:45:44 +00:00
Paul Berry 2768cce4bf Revert "Do not append ! to type names in tests that exercise NullabilitySuffix.none."
This reverts commit 890d12fa47.

Reason for revert: Bot failures

Original change's description:
> Do not append `!` to type names in tests that exercise NullabilitySuffix.none.
> 
> Appending `!` is confusing because it suggests a non-nullable version
> of the type.  But the absence of a `?` or `*` suffix doesn't mean the
> type is non-nullable.  For type parameters, the type might or might
> permit null depending on how it is instantiated.
> 
> Change-Id: I3c98ddeb80816cc82e00e2692977e66c9fb51170
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99373
> Reviewed-by: Dan Rubel <danrubel@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

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

Change-Id: I5fe26d9d668dde4072ec0e4e25b9865a047bb817
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99447
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-16 14:53:59 +00:00
Konstantin Shcheglov 8188e02661 Create ConstFieldElementImpl for final instance fields in classes with const constructors.
R=brianwilkerson@google.com

Change-Id: Ie8590959e11b642951fae8fd39b93b75181034e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-16 14:16:46 +00:00
Konstantin Shcheglov 6761015e30 Fixes for unresolved and invalid URIs.
R=brianwilkerson@google.com

Change-Id: Ief66dea3203187da90367984dc33f535748938d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-16 14:10:56 +00:00
Paul Berry 890d12fa47 Do not append ! to type names in tests that exercise NullabilitySuffix.none.
Appending `!` is confusing because it suggests a non-nullable version
of the type.  But the absence of a `?` or `*` suffix doesn't mean the
type is non-nullable.  For type parameters, the type might or might
permit null depending on how it is instantiated.

Change-Id: I3c98ddeb80816cc82e00e2692977e66c9fb51170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99373
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-16 13:29:32 +00:00
Paul Berry 2f77be6dc7 Fix overzealous rename.
In 79974bb026 I accidentally renamed one
of the withNullability methods, causing it to become disconnected from
the method it was overriding.  This CL undoes the bogus rename.

Change-Id: I24655d76ef5c602e967a055e86d072a87435f3a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99480
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-16 13:22:42 +00:00
Paul Berry bd4576174e Remove the nullability variants of dynamic, bottom, and void.
Dynamic and void are always nullable.  Bottom is never nullable.

Change-Id: I198dd6ccc84684ed05c578a5f80b1770d3f14b39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99276
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-15 22:04:21 +00:00
Paul Berry a82a35af71 Rework _checkForDeadNullCoalesce using isNonNullable.
Change-Id: If55565d272af1be44e3326c3ec34889b3258323b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99367
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 22:04:21 +00:00
Brian Wilkerson fa5440a568 Fix a typo in the comments
Change-Id: Ie67ca958622aef487322ad32d32d807f39cfe6f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99381
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-15 21:58:36 +00:00
Brian Wilkerson 77d096ca94 Add AST representation of the required keyword
Change-Id: I7eededadfa7bf5648cbaadbbccb0ef65af9a839f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99371
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 21:56:16 +00:00
Paul Berry f315727b79 Add basic resolution semantics for null-assertion operator
Change-Id: I69d0c577938a8991b98c44577556722bf54a1df8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99285
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 21:46:07 +00:00
Konstantin Shcheglov 3937751b94 Switch AST summaries tests from the hardcoded SDK to MockSdk.
We have implemented enough to link MockSdk.

R=brianwilkerson@google.com

Change-Id: I6593a6a65773c5727a2bcd1d0b937b35bf8598ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99368
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-15 20:44:22 +00:00
Konstantin Shcheglov 369c9653c6 Store 'definingType' for next to raw Element references.
R=brianwilkerson@google.com

Change-Id: Ieb21f9af030b65afb59491f50a5659c564dfc419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99366
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-15 20:37:06 +00:00
Brian Wilkerson b9eb7c312c Add nullability testing methods to TypeSystem
Change-Id: I6451468eafedddb75a7012f328d730836694bdd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99380
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 20:32:05 +00:00
Konstantin Shcheglov 55ff0abde5 Rework building types for type annotations and declarations.
It is possible that a TypeName is a typedef, for which we have not
built types for its return type and parameter types. So, we cannot
rely on the order of nodes in NodesToBuildType. We have to build types
recursively.

R=brianwilkerson@google.com

Change-Id: Idb865ed1723456ccaea49802ea5e869e544461d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 20:06:13 +00:00
danrubel 0b6c61dbd3 tests for issue 36055
Change-Id: I1ccd5deb6cff6e046895220ffdd03842ec5c20d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-15 19:28:45 +00:00
Brian Wilkerson ae05bc6ec5 Add support for the type Never
Change-Id: I174ab85c0010a900b4d84068a90ac27e76b0e80c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99363
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 19:24:25 +00:00
Paul Berry 79974bb026 Rename Nullability enum to avoid confusion with spec.
The spec uses the terminology "nullable", "non-nullable", etc. to
refer to properties of types that differ subtly from their structure.
For example "Null" is considered nullable, even though it lacks a
trailing "?".  Since we were using the Nullability enum to denote a
purely structural property of types (whether they end in "?", "*", or
neither), this led to confusion.

So to avoid confusion, we rename the Nullability enum, and its
enumerated values, to clarify that it refers specifically to the
nullability suffixes and not to the property of being
nullable/non-nullable.

Change-Id: Ia34a500a3d2d724d30c66a410140ae11d6512f50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99275
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-15 16:50:14 +00:00
Brian Wilkerson 193458abaa Return the keyword from childEntities for import and export directives
Change-Id: I92d04bb856d7798d141f871766ec417745dd5f13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 15:36:45 +00:00
Keerti Parthasarathy b997b59c09 Include manifest in the list of files to analyze
Change-Id: I9b1c52ce085303e84b8882b0ccdc51c9555ce55c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-15 14:15:15 +00:00
Brian Wilkerson ec0447db5d Add support for using ExpectedError and convert a couple of tests over to use it
Change-Id: I04a89cc922e0046dee4d7e9f964f272cfc60a055
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-15 02:17:44 +00:00
Brian Wilkerson ea8d6e6fa9 Rename some error checking methods
Change-Id: I5a750c16a8c49d724f964efa5184a3d82abce8ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-14 15:10:33 +00:00
Konstantin Shcheglov 3e6fd64a8a Dependencies based type inference with AST summaries.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I1513d54f6d6dbab70fa58af8d9c68a186c2a1ee3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99273
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-14 04:54:33 +00:00
Brian Wilkerson 0aa5547de1 Add missed tests and fix bug
Change-Id: I7696207525a009860f813ddcb94528edbf12ac4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99244
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-13 20:39:13 +00:00
Paul Berry 22a843a23d Fix precedence of postfix "!" operator
Change-Id: I00446e15cd7e19285b35742a1936c36b1faf4774
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99282
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-13 16:20:22 +00:00
Paul Berry f3dbfee467 Fix the error message template for EXPERIMENT_NOT_ENABLED.
Given an experiment named foo, it doesn't make sense to ask the user
to enable experiment --foo, since that's not the syntax for enabling
an experiment (the syntax is --enable-experiment=foo).  Changed to
'foo'.

Change-Id: I055461fb389a4338578fc7f260e252b8e3fe9a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99286
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-13 16:19:23 +00:00
danrubel 2e7bd1359d parse dart language version comment
This updates the parser to recognize a language version comment
of the form

// @dart = <major>.<minor>

as specified in
https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/language-versioning.md#individual-library-language-version-override

Change-Id: I884620ac7da86025f5b408bcba8dd1f77e4c523c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99261
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-13 13:09:22 +00:00
Sam Rawlins e89850f95d Move STRICT_RAW_TYPE on constructors to INFERENCE_FAILURE_ON_INSTANCE_CREATION
Bug: https://github.com/dart-lang/sdk/issues/33749 https://github.com/dart-lang/sdk/issues/36445
Change-Id: Ic34f0e07b1cc5cbbc265ab2c32cabc61d7901c0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99264
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-04-12 23:51:21 +00:00
Brian Wilkerson 0314d86af4 Add errors when a nullable type is used as a supertype
Change-Id: I82471ba67dd74db6425bb2081bd761eb2b490333
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99284
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-12 21:13:21 +00:00
Konstantin Shcheglov 85f623374a Triage and fix some more tests.
R=brianwilkerson@google.com

Change-Id: Ia5fcd1591532c3030eb2030ea483192b8c35fd05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-12 14:19:17 +00:00