Commit Graph

7128 Commits

Author SHA1 Message Date
Konstantin Shcheglov d1b675055c Read all GenericFunctionType(s) and TypeParameter(s) is lazy AST before reading eager AST.
So, that all corresponding elements are available.

R=brianwilkerson@google.com

Change-Id: I844cc276fda574883a658cc9b150a0a74b13e63a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100120
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-22 18:55:16 +00:00
Paul Berry 4a33d33297 Store FeatureSet in CompilationUnit.
Change-Id: I8c132b0ae93ee76adb5cf89f8a725db048b9e935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100060
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-22 17:38:39 +00:00
Dan Rubel 08832508ec Forward "late" modifier to parser listeners
... and update parser tests to use preNonNullable feature set
to address comments in https://dart-review.googlesource.com/c/sdk/+/99963

Change-Id: I3a3293d65805807b7b95e887f829f3f0080ae3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 17:20:10 +00:00
Dan Rubel fd48001ace Put NNBD modifiers behind a flag
Fix https://github.com/dart-lang/sdk/issues/36691

Change-Id: I48aa72eb6a4aa63d072089baaf99d249763095fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99963
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 15:31:09 +00:00
Konstantin Shcheglov a9b1d9e33b Splice resolved API nodes and unresolved function bodies.
After attempting to use DeclarationResolver to implement building
elements, I decided that this does not work well enough, and we need
a more specialized implementation. This also opens ways for interesting
optimizations in the future, e.g. we don't need to resolve any names in
APIs of nodes - they are already resolved summaries.

R=brianwilkerson@google.com

Change-Id: Ib448eb7334b469296ffb866ba27ae7edd0d4543a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-22 15:02:29 +00:00
Paul Berry d50232a3f5 Plumb new FeatureSet class into AstBuilder.
And change clients of parser and AstBuilder (within the SDK) to use
it.

Long term, it would be better to store the FeatureSet object directly
in the AstBuilder and remove the existing flags `enableNonNullable`,
`enableSpreadCollections`, `enableControlFlowCollections`, and
`enableControlFlowCollections`.  However there are analyzer clients
that currently use these flags.  So for now, we simply plumb in the
FeatureSet as a new way of setting AstBuilder flags.  Once we've
updated clients to use FeatureSet, we'll publish a breaking version of
the analyzer that removes the old flag API.

Change-Id: I6d37177c40b1a1216956e95f473252aa218d10b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100000
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-22 13:38:59 +00:00
Paul Berry 780f1b6c3e Remove unused imports
Change-Id: Ia34e9d49e1baffe96a7da72a663f6751de31fc36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100041
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-22 13:29:19 +00:00
Brian Wilkerson c3f822eae6 Attempt to fix failures on the windows bot
Change-Id: I668e62e5b866b83bba24a8406ffcaca4450eeb46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-21 19:42:17 +00:00
Brian Wilkerson 47a8ff60e1 Convert more analyzer unit tests
Change-Id: Ie457491e24bc8820d24c533342b0d74edb922370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100001
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-21 15:29:17 +00:00
Paul Berry 76f177a492 Use a non-null index for all features, even expired ones.
This ensures that the FeatureSet object can track the presence or
absence of expired features.

Change-Id: Ie6e213993792b8c3d6cf84ef01c464c16c274b85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-20 13:53:45 +00:00
Paul Berry 680744d169 Fix version number strings to always include a patch number.
The version parser we use (Version.parse from package:pub_sumver)
doesn't support `major.minor` formatter version strings.

Change-Id: Ie6bf59d0f59d24d036c037d079494eb980e73212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-19 22:44:31 +00:00
Brian Wilkerson af0fa108da Add support for required named parameters
Change-Id: Iebfd8da18c6f2158ed39043ab116e2670a7329c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99717
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-19 19:25:01 +00:00
danrubel a2e06eafff allow built-in keywords as identifier in for-in loop
Fix https://github.com/dart-lang/sdk/issues/36678

Change-Id: I2af3a21e96c5654b12c199fc71d87f088e9d739d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99904
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-19 19:07:11 +00:00
Paul Berry 63658b113c Proposed new API for tracking feature opt in/out
Change-Id: I777094da1301b525cd92cab1f9bf49d2f70a911b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99784
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-19 18:20:41 +00:00
Konstantin Shcheglov 9e87c16677 Record TopLevelInferenceErrorKind.dependencyCycle in summary2.
R=brianwilkerson@google.com

Change-Id: I1869f31dd6163827026e8e9d54e8682cb9ab2405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-19 15:45:34 +00:00
Konstantin Shcheglov fa7485f28e Build types for not simply bounded elements using dynamic type arguments.
R=brianwilkerson@google.com

Change-Id: Ia3c2d5193212a8cf58caad2323185e1ac9e31c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99716
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-18 20:14:49 +00:00
Konstantin Shcheglov e6e2a196a3 Issue 36667. Check for unresolved URI in getLibraryByUri().
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36667
Change-Id: If35719b350c2f26edbb7cbe42f51af896aa41fe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99713
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-18 18:02:38 +00:00
Konstantin Shcheglov 92729e0cd3 Remove UndefinedTypeImpl.
And corresponding DartType.isUndefined as well.

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

Change-Id: I85debe627e989b5a5671becf5d9dd16413562236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99729
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-18 17:42:28 +00:00
Devon Carew cf77b82f52 [analyzer] handle youtube and animation dartdoc directives
Change-Id: I5bcad74803da2466c8a50160823c586f57e00ec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99711
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-04-18 17:18:28 +00:00
danrubel 6384f629c0 new conflicting-modifiers error code
This adds a new "conflicting modifiers" error code for new NNBD
modifier errors and replaces the existing "const and var" error
code with the new error code.

Change-Id: I1997bbb7f66e62d2de3c5042b6ea85861f2e00d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-18 16:44:08 +00:00
Paul Berry af9c01432c Remove unused import
Change-Id: I41a322c6eb208127256d752be23a92e59a01387f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99710
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2019-04-18 14:10:48 +00:00
Konstantin Shcheglov 7b6b8f8c43 Restore 'parameters' and 'typeParameters' for ParameterElementImpl.
This partially reverts https://dart-review.googlesource.com/c/sdk/+/5000
which was done during moving toward integration with Kernel, which
we don't do anymore.

With summary2 the FunctionType of a function type parameter is purely
synthetic, without its original element. However parameters in
function typed parameters still exist as nodes, so they must have
elements.

R=brianwilkerson@google.com

Change-Id: I6689b05459f3989a20839346013c80a86ac8dc7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99709
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-18 14:10:18 +00:00
Paul Berry bc58bf598e Add summary serialization support for nullability suffixes.
Resynthesis support will be added in a future CL.

Change-Id: I652da0c1ba60d8e41179e952294b4a4b45961347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99702
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-18 12:11:08 +00:00
Sam Rawlins 284a299543 Fix mustCallSuper for mixins; fixes #36492
This re-lands most of https://dart-review.googlesource.com/c/sdk/+/98443.
This change does not include the "inherited interfaces" bit of that CL,
which some developers have objected to; we'll discuss.

Bug: https://github.com/dart-lang/sdk/issues/36492
Change-Id: Ibaa8ab87c749eae6359b739204c6f286b6818aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99727
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-04-17 22:59:11 +00:00
Konstantin Shcheglov 703ccc974b Support for TypeParameter metadata.
R=brianwilkerson@google.com

Change-Id: Id0d0b9018538986787832c8001c6aa43c6bec380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99733
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 21:47:13 +00:00
Dan Rubel b8a9711489 Update AstBuilder to handle "required" modifier
Change-Id: I68a3f0abd405119ccc52dc9263860129fff7453a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99486
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 21:19:51 +00:00
Dan Rubel ca28e2c8ce forward "required" modifier to parser listeners
... and have each report an error by default

Change-Id: If818a7bb207becbed95a97890632a1803917d285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 21:19:51 +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
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
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 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
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