Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov ce5fb94014 Issue 40538. Revert YieldStatement changes after reverting language spec decision.
Bug: https://github.com/dart-lang/sdk/issues/40538
Change-Id: Idd563a15dc1e17e1271f823c33d015c73f720874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136814
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-23 21:32:44 +00:00
Konstantin Shcheglov f8f4b5ddd7 Transition DAS to analysis / idle when setAnalysisRoots with no Dart files.
Bug: https://github.com/dart-lang/sdk/issues/40096
Change-Id: I84b83d374e325f1c3c90be30c5c33ed6007b8849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-23 21:04:47 +00:00
Brian Wilkerson cc45c9358b Rename another diagnostic code
The diagnostic applies to both the if-null expression ('??') and the
compound assignment expression ('??='), so it seems like the name should
be more general.

Change-Id: I004cc2924ef97fcbd2168f070380ff17152cbb0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136903
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-23 17:11:24 +00:00
Konstantin Shcheglov bc2c4181c1 Issue 40734. Allow multi-digit major / minor language version components.
Bug: https://github.com/dart-lang/sdk/issues/40734
Change-Id: Ic88082ba0ee86986e92c0944a93c0b299a1c825f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136804
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 21:38:40 +00:00
Konstantin Shcheglov ce26dfda7d Issue 37487. Add CompilationUnit.languageVersion override.
Bug: https://github.com/dart-lang/sdk/issues/37487
Change-Id: I57fbcdd6771d9004ba1fc43902c19514dab2a23d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 20:19:43 +00:00
Konstantin Shcheglov c09e6c18b7 Issue 40538. Verify yield statements using new element type based rules.
Bug: https://github.com/dart-lang/sdk/issues/40538
Change-Id: I9feaca0484f7a5c779068e823bbd765f5c06fe59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136712
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 19:26:27 +00:00
Brian Wilkerson 33e6f4af33 Rename a diagnostic code
Change-Id: I0b712af35d4a904bd0507b63ca52595cfcc7de2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136728
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 18:34:20 +00:00
Konstantin Shcheglov a248f88e8e Extract YieldStatementResolver.
Change-Id: I1e7c60dac6d97152fc8e3a463bc2f66274ed4f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-20 19:53:45 +00:00
Brian Wilkerson 4ef4371891 Replace "generates" with "produces" in the diagnostic docs for consistency
Change-Id: I231467cb2186d81068e99215a6e94d6f76a31666
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136641
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2020-02-20 17:22:19 +00:00
Keerti Parthasarathy 67e42b611c Add a resolver for resolution of a single file.
Change-Id: Ibe7062942db8d921c8305a5ab7fd5bd0f9667773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136409
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-20 16:06:39 +00:00
Jens Johansen bc4893a3b3 Revert "[parser] New syntax for null aware index"
This reverts commit cf4e044e07.

Reason for revert: Breaks internal customer.

Original change's description:
> [parser] New syntax for null aware index
> 
> Change-Id: Iea6b29eb897eb01863a92b223e270d225c3ca1ba
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135903
> Commit-Queue: Jens Johansen <jensj@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,jensj@google.com,johnniwinther@google.com

Change-Id: Ic0ff607c944e489f29bda7da37afd63c62d368eb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136600
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-02-20 14:11:08 +00:00
Jens Johansen cf4e044e07 [parser] New syntax for null aware index
Change-Id: Iea6b29eb897eb01863a92b223e270d225c3ca1ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135903
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-20 12:33:28 +00:00
Konstantin Shcheglov 81d4cc6bc9 Issue 40701. Include 'late' into unlinked API signature.
R=brianwilkerson@google.com, pquitslund@google.com

Bug: https://github.com/dart-lang/sdk/issues/40701
Change-Id: Ia11ff4e65e779c4a370a6fec539564c0533bffa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136529
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-20 04:16:35 +00:00
Konstantin Shcheglov ff8a5dfb72 Issue 40689. Add isStatic to available Declaration.
I did not use it yet, but filtered out all not top-level declarations
that are not CONSTRUCTOR or ENUM_CONSTANT. But isStatic might be used
if we decide to suggest static getters.

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

Bug: https://github.com/dart-lang/sdk/issues/40689
Change-Id: I1c86754d9dbbc1422defc06a8fe6a47fa0bf6f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136410
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 21:29:24 +00:00
Konstantin Shcheglov ba579eef57 Issue 39791. Infer Object? instead of Null or Never.
Bug: https://github.com/dart-lang/sdk/issues/39791
Change-Id: Iac4dae42b30d9358d818b78c77462312bab672fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 21:01:56 +00:00
Konstantin Shcheglov 21b78a1f85 Implement TypeSchemaEliminationVisitor using ReplacementVisitor.
Change-Id: I3a33031e20de34061f9bdc436506b59487dfbcbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 20:41:24 +00:00
Konstantin Shcheglov cef02fff52 Merge Dart2TypeSystem into TypeSystemImpl.
Just mechanical movement of methods.

Change-Id: Ieb62190d2d531652b50cd233145f3dea22c00d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 22:37:35 +00:00
Konstantin Shcheglov 4592153aec Add ReplacementVisitor, implement NullabilityEliminator with it.
Change-Id: If8c0fcee76733c0c3e9605becd6738fa9d92df2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 22:37:34 +00:00
Konstantin Shcheglov 303992f7a7 Don't report StrongModeCode.INVALID_CAST_* for NNBD libraries.
Change-Id: I87e0a2cbeb1365a5facd48c154ff0986c857fabe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 17:35:54 +00:00
Konstantin Shcheglov 21e944f1bc Use promotedBound for TypeParameterType promotion.
Change-Id: I217a8b9140f60d4f6a9ffc052564388c24c1a7ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 17:11:44 +00:00
Daco Harkes 3c9f52a499 [vm/ffi] Fix DynamicLibrary extension name
And add changelog entry.

Follow up of: https://dart-review.googlesource.com/c/sdk/+/135463

Closes: https://github.com/dart-lang/sdk/issues/35903
Closes: https://github.com/dart-lang/sdk/issues/40636

Change-Id: I877f735c54e466031715c775d37544617402f9ff
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-kernel-nnbd-linux-release-x64-try,analyzer-linux-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136124
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-17 14:55:25 +00:00
Keerti Parthasarathy 88a711d398 Update idl with classes to store unlinked info with content hash, and linked bundles with signature.
Change-Id: I9c8ffa4d1b87d6f4260e48c709801fc6750c2457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135820
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-14 22:17:27 +00:00
Mike Fairhurst 9fbfe31f7c [nnbd_migration] Add tests for important real-world exact nullable case
Add tests verifying #40590 so that we don't regress it.

Change-Id: I74105cc1e6a33b75d7ff67dc07b7cc913040dc8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135840
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-02-14 21:48:22 +00:00
Paul Berry d5e6ab4195 Migration: propagate non-null intent through compound nodes.
A compound node represents a logical OR ("this node is nullable if and
only if one or more of its components is nullable").  Therefore, if
*all* of the components of a compound node have non-null intent, we
should consider the compound node itself to have non-null intent.
This fixes a problem that was preventing the migration tool from
respecting a "/*!*/" hint applied to the type parameter of a typedef.

Change-Id: Iec2f9d6968378707ba692be7b97f750cf53a8b85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135786
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-14 21:25:01 +00:00
Konstantin Shcheglov 6ae2a011d5 Use named parameters in TypeParameterTypeImpl.
Change-Id: I643acc61f53dfaf2e0c9bec7970fa6c33ff26850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135964
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-14 21:19:26 +00:00
Konstantin Shcheglov 63ed271759 Create fresh TypeParameterElement(s) for executable members.
Change-Id: I19aa9b529470654460d5ead84996e5308a217291
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-14 19:21:27 +00:00
Konstantin Shcheglov 6635b1d9a0 Issue 40396. Report BODY_MAY_COMPLETE_NORMALLY when a body that is expected to return a potentially non-nullable type may complete normally.
Bug: https://github.com/dart-lang/sdk/issues/40396
Change-Id: I58d48a5191950f55d6a59b163d122150e7ad3d09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-14 19:13:03 +00:00
Konstantin Shcheglov 5ec14d6e14 DartObjectImpl.isIdentical() should compare types.
Change-Id: I6b510351f5703956d77e3cae2dd31490c819f87f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-14 16:56:47 +00:00
Daco Harkes c1467ab5d3 [vm/ffi] Change asFunction and lookFunction to extension methods
This prevents them from being called dynamically.
Moreover, it prevents asFunction from being called on a non-NativeFunction type argument, simplifying the amount of manual checks.

Note that this CL had to change the CFE and analzyer, and their tests (including mock_sdk) as well.

This can potentially be a breaking change, as the extension methods are only visible when `dart:ffi` is imported, while methods on objects are always visible.

Issue: https://github.com/dart-lang/sdk/issues/35903

Change-Id: I1e291f154228d5d9a34b21a022088bf493f6557d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135463
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-14 15:46:37 +00:00
Konstantin Shcheglov ed705e8c84 Move DEAD_NULL_COALESCE reporting to ErrorVerifier.
So, it is reported even when hints are disabled.

Change-Id: Id2df8faa5421fac00e01755a70aedf3d3f570f10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-13 19:42:48 +00:00
Konstantin Shcheglov 84ff9e5008 Fix NullabilityEliminator to substitute type parameters in bounds.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I9b3d986a52f8006854b23db600493566aea86cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135527
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-12 22:08:27 +00:00
Konstantin Shcheglov 78b1e15637 Don't report NULLABLE_TYPE_IN_CATCH_CLAUSE in opt-out libraries.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iabd6a4b23c81e25bc7045db6d562c38567c81921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 20:22:37 +00:00
Konstantin Shcheglov 0fa3d79a3f Move applying LEGACY_ERASURE to isCorrectOverrideOf().
Change-Id: Ic9ebd89be8dbbb560b47ae9f96988b552b75ddaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 20:01:27 +00:00
Konstantin Shcheglov fa74c546b1 Use default FeatureSet for a file in its unlinked unit key hash.
BUG=https://github.com/dart-lang/sdk/issues/40609

Change-Id: I4f333c802d1ba086354701aa41a75dadca8099a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 18:57:57 +00:00
Konstantin Shcheglov 08778f9045 In legacy libraries apply LEGACY_ERASURE to concrete members.
This fixes with unforked SDK:
* language_2/abstract/equal_test
* language_2/abstract/object_method_test

Change-Id: I8d183f5a15eef29c590fe56f40e813d56ba6ad54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135359
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 18:12:57 +00:00
Konstantin Shcheglov 7575235e3b Test that function types use mutual subtyping for type parameter bounds.
For https://github.com/dart-lang/language/issues/807

Change-Id: Ife86fa35fda20347437391d742a4432518d7898a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135350
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 00:29:05 +00:00
Konstantin Shcheglov 2f7f627051 Support for --default-language-version flag in analyzer_cli.
Change-Id: I3e275c058748d0bf35746280d02ed5a83f5c8685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135348
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 23:38:35 +00:00
Konstantin Shcheglov b63e3f9425 Replace AnalysisOptions.enabledExperiments with contextFeatures.
There should be just one source of FeatureSet, so that when we add
--default-language-version flag, we apply it to the FeatureSet, and
set as the default for the context.

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

Change-Id: If140768bb51db1b0f736b91ab5d624e22100405e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135347
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-11 20:16:14 +00:00
Konstantin Shcheglov 9f6a198a8d Remove @required from AnalysisDriver packages parameter.
It is required, and we really expect clients to provide it.
But this is a breaking change, and it causes internal build failures.

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

Change-Id: I3afd8b748e41c5b4ac7a8e4ad4ac4aafc5a17204
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-11 19:21:34 +00:00
Konstantin Shcheglov b7dcc8507a Issue 40546. Fix getSourceKind() for files that are from external summaries.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40546
Change-Id: I06f99175c9aee127e71b99ff7f0e70066965d6f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 18:04:05 +00:00
Brian Wilkerson 5340bbff98 Add context messages for cases where different types have the same name
Change-Id: I2a83f1d5a7c3a8852a6cb91b809bf79c4dbfef71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 17:42:33 +00:00
Konstantin Shcheglov abf7d1fc08 Issue 40572. Pass Packages to AnalysisDriver.
Just as SourceFactory is given to AnalysisDriver, so should be Packages.
Understanding --packages and discovery in out of scope.

Bug: https://github.com/dart-lang/sdk/issues/40572
Change-Id: Id120fba0f23a4423797fa9976c4cda5ed54dad53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135188
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-11 00:57:45 +00:00
Konstantin Shcheglov 085c4b49a4 Issue 40482. Fix for Function?.call() reporting unchecked nullable.
Bug: https://github.com/dart-lang/sdk/issues/40482
Change-Id: Ifb65cd8016dca18c634cd216759278b7518d41ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 23:26:55 +00:00
Konstantin Shcheglov 7be0667fc3 Issue 40398. Fix for checking type arguments in legacy libraries.
Bug: https://github.com/dart-lang/sdk/issues/40398
Change-Id: I4f0086fdf3c0efc5d43976ee9b99566b1eb43f35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 22:56:15 +00:00
Konstantin Shcheglov 85c197a848 Optional parameters of abstract methods may omit default values.
https://github.com/dart-lang/co19/issues/516#issuecomment-582039754

Change-Id: I651fd77f03b96b69f5f43bdb1933dd6ad00e2a46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135160
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 21:40:45 +00:00
Konstantin Shcheglov 0bd76c7d37 Issue 40546. Ensure that getSourceKind() works for changed files.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40546
Change-Id: I68b3e0610960bfbad05d6d132d534cea9cfe5925
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 18:14:44 +00:00
Brian Wilkerson d0e779ff71 Improve some diagnostic documentation
This recpatures some documentation lost in
https://dart-review.googlesource.com/c/sdk/+/129833.

Change-Id: Ie8355533bd0c42360c9d7dd2138813c83391d7c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-09 20:57:33 +00:00
Konstantin Shcheglov 5244d99a5d Issue 40547. Make MISSING_ENUM_CONSTANT_IN_SWITCH a warning.
Bug: https://github.com/dart-lang/sdk/issues/40547
Change-Id: Ia041ef7940372ed801a6ffcefc9d9333d6c943fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
2020-02-09 19:21:43 +00:00
Konstantin Shcheglov 4aa097b082 Issue 40394. Report warning for nullable enum in switch.
Bug: https://github.com/dart-lang/sdk/issues/40394
Change-Id: I9e8112ead97d5ecaccc167b2378112cefa391bcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134874
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-08 19:59:07 +00:00
Paul Berry 1554a119ed Migration: add explicit parameter types to function literals when necessary.
Under NNBD rules, certain function literals have their types inferred
as `Object?` instead of `dynamic`.  We need to add explicit `dynamic`
to prevent follow-on errors if those parameters are used in a dynamic
fashion.

Change-Id: I12bfd3a3da2bda1ae11b01a5d029dbea3d512cb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134567
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-07 23:07:27 +00:00