Commit Graph

10502 Commits

Author SHA1 Message Date
Sam Rawlins 1497af771b Analyzer: Report when enum value names conflict with Object instance members
Fixes https://github.com/dart-lang/sdk/issues/23353

Change-Id: I74ed41863e0811a15d7c078a7fb71e63f0fe34a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150269
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-09 04:09:21 +00:00
Konstantin Shcheglov 5fbf7952d2 Don't apply extensions to Never.
https://github.com/dart-lang/language/pull/1003

Change-Id: Ie9526e8e362865754e84b5d9cda307dc7b07aaee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-08 18:20:53 +00:00
Konstantin Shcheglov e3c3d4df32 Issue 42178. Fix for crash when 'Class?.method()' resolution.
Bug: https://github.com/dart-lang/sdk/issues/42178
Change-Id: I86312a35aed7342492bff9aae22121a05e7906ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150184
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-08 18:05:04 +00:00
Paul Berry 96c2cc2589 Migration: fix class hierarchy handling in FixBuilder.
When running the FixBuilder we need to override the behavior of
ClassElement.interfaces so that it returns the post-migration
interface types.  We also need to override the behavior of
LibraryElement.isNonNullableByDefault so that the library being
migrated is considered opted in during FixBuilder analysis.  This
required adding hooks to the analyzer to allow those overrides.

Additionally, since the analyzer caches the InheritanceManager, we
need to clear that cache out just prior to running the FixBuilder, so
that no pre-migration interface types leak into the FixBuilder.

Fixes #40475.
Fixes #42139.

Change-Id: I45e2c30ebe8c12e4a599e2458d77a3731bad0f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150260
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-08 17:26:41 +00:00
Sam Rawlins 66e2b22d14 Analyzer: report conflicting extension type variables
Fixes https://github.com/dart-lang/sdk/issues/42216

Report when an extension declares a type parameter with the same name as the
extension.

Report when an extension declares a member with the same basename as the name
of any of the extension's type parameters.

Move tests into diagnostics/.

Move tests for RECURSIVE_INTERFANCE_INHERITANCE.

Change-Id: If19041571008b9b14122d9ff458d1d30ea0ff034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-08 05:44:12 +00:00
Konstantin Shcheglov 87c5e3612b Issue 42201. Use fresh type parameters in extension inference.
Bug: https://github.com/dart-lang/sdk/issues/42201
Change-Id: I6dd8071821fa03c5c20541b65a7c143d4a739730
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150271
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-07 17:43:22 +00:00
Konstantin Shcheglov a12fd560b7 Implement allowedExperimentsJson for EmbedderSdk.
https://github.com/flutter/engine/pull/18830

Change-Id: Iab1a3dd319da12d192a042b75a8ff6affc4d11cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150169
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-04 23:29:12 +00:00
Jens Johansen cbbbc09b3e [parser] Better recovery of typedefs with bad name
Note that this leaves differences in errors issued between
"typedef void void();" and "typedef void = void Function();" though.

Fixes #42158

Change-Id: I0785f99234c87bdeadbb2865e089b1389851333e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149599
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-06-04 14:21:11 +00:00
Michael Thomsen 873bd241dd Clarify terms for environment declerations
Fixes https://github.com/dart-lang/sdk/issues/42136

Change-Id: I53ab8d0608f0229a4e22d24e54f29a5ddf150766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149595
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-03 13:37:19 +00:00
Paul Berry 79dc94e88a Add a pubspec dev_dependency from analyzer to linter.
This is needed because
pkg/analyzer/test/src/dart/micro/file_resolution.dart
imports package:linter/src/rules.dart.

Change-Id: Ida47237044637f1f6790b344221e5846d020d418
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-03 12:23:29 +00:00
Paul Berry 155ebfa92a Prepare to publish analyzer 0.39.10
I'm going to cherry-pick this commit (as well as
b96fa9bf85) right on top of analyzer
0.39.9, so even though we usually publish analyzer and
_fe_analyzer_shared together, it's not necessary to do so now.

Change-Id: I27742c1e2689e35fdbe88935525d062dece3ab72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-03 02:02:54 +00:00
Konstantin Shcheglov b96fa9bf85 Fix the breaking change in SummaryBuilder.
Bug: https://github.com/dart-lang/sdk/issues/42163
Change-Id: Ie1196584119a74a8aca740a2c1c4eb46172c6c3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149781
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-03 00:52:58 +00:00
Parker Lougheed cad7b26b47 [pkg/analyzer] Update pedantic to 1.9.0
Change-Id: I1161ed0c4681ddc8d2bd494586a9442a2ce1c4e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-02 21:41:03 +00:00
Paul Berry ad044b8a4f Prepare to publish analyzer 0.39.9 and _fe_analyzer_shared 4.0.0.
Change-Id: Idb30ab930d408423f2865a71ca3da0b3daf464da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-02 20:20:43 +00:00
Sam Rawlins 8020a0f286 Analyzer: move built_in_identifier_* tests
Change-Id: I9802a055d40ac20f928e4b6e68fd0aecd0f9bc74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149665
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-02 16:52:12 +00:00
Sam Rawlins 598c65165b Analyzer: Mark used extension operators as such
Fixes https://github.com/dart-lang/sdk/issues/42122

Change-Id: I3cc57715471a6369c60d21e2a691e8cc0d90f809
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149663
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-02 16:37:22 +00:00
Paul Berry 930cae0f13 Revert "Remove DartSdk.useSummary."
This reverts commit a2c3ecabce.

Reason for revert: Breaking change to de facto API

Original change's description:
> Remove DartSdk.useSummary.
> 
> R=​brianwilkerson@google.com
> 
> Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

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

Change-Id: I9998bedb74ea940371f18ac7dce42b2f5dcc3b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149687
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-02 15:20:32 +00:00
Sam Rawlins 695470eb70 Analyzer: skip using bazel-bin
bazel-bin or blaze-bin may result in the wrong directory from being
used. The shortcut does not provide much benefit, and has a risk of
being wrong.

Bug: b/154627287
Change-Id: Ib629492a6c3a3c82519e3382c5bacec74d9272a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-01 22:49:48 +00:00
Konstantin Shcheglov fe52ae462c Instantiate Never as Null* in legacy libraries.
Change-Id: Ibe7302a539e7debd0cab468119a4dba0a4517163
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 19:44:58 +00:00
Konstantin Shcheglov 197bc061b9 Issue 38799. Test that function expressions can infer Never as return type.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38799
Change-Id: I1093749cb31a00a1b450c23ec4631595bce4bd00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149605
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 18:38:07 +00:00
Konstantin Shcheglov 058e25875c Issue 42093. Add async test.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/42093
Change-Id: I96b5c1597d7d16b269b6f6c7d3fd67bd960ff589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 18:28:38 +00:00
Konstantin Shcheglov fe6fc7803d Remove AnalysisDriver.useSummary2
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I789794c80484143288be8ef3d14ff78b8976e494
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149607
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 16:48:26 +00:00
Konstantin Shcheglov a25f8e54ac Extensions are always enabled, merge corresponding tests.
Change-Id: I2a2603ea506baaf95ce26da656cee965faf094c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-01 16:47:36 +00:00
Konstantin Shcheglov 24c50fb8b2 Issue 35710. Test switch exhaustiveness, improve for null.
Bug: https://github.com/dart-lang/sdk/issues/35710
Change-Id: I6f17db1a9b2c01ec4b97538e224146fd3cec9002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149606
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-31 18:58:53 +00:00
Konstantin Shcheglov 20e6f150e5 Fix crash when inferring types with FunctionExpressionInvocation and out of order dependencies.
This fixes language/lazy/static_test

R=brianwilkerson@google.com

Change-Id: I52c25903de8096af58b4fac9654eace7ee358aba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-31 01:56:22 +00:00
Konstantin Shcheglov a2c3ecabce Remove DartSdk.useSummary.
R=brianwilkerson@google.com

Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-30 19:07:32 +00:00
Konstantin Shcheglov 439e99483f Remove DartSdk.getLinkedBundle().
R=brianwilkerson@google.com

Change-Id: I2335ad03856b73e6d864d939a90839ef85dcab78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149487
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-30 03:16:51 +00:00
Konstantin Shcheglov 89782c96d9 Implement changes to return type verification.
https://github.com/dart-lang/sdk/issues/41803
https://dart-review.googlesource.com/c/sdk/+/149163
https://github.com/dart-lang/language/pull/989

Change-Id: I13caf53a3e96c7b266dd3b3bf511002addcf83b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149373
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 23:09:37 +00:00
Konstantin Shcheglov 1b6201bfe5 Update build_sdk_summaries to 'build' command, update help.
Change-Id: I8aac5209fc0c7c481c9bf5ffb93faef183532572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-29 18:22:04 +00:00
Konstantin Shcheglov a2e85dcda9 Rename HintCode.DEAD_CODE visitor to LegacyDeadCodeVerifier, report other dead code.
Finishing https://dart-review.googlesource.com/c/sdk/+/149240

R=brianwilkerson@google.com

Change-Id: I801f9140587d16969d639889fa14efde3b09dd4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149388
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-29 17:40:46 +00:00
Konstantin Shcheglov 6a551f8d54 Use allowed_experiments.json when building SDK summary (reland).
Landed: https://dart-review.googlesource.com/c/sdk/+/149052
Reverted: https://dart-review.googlesource.com/c/sdk/+/149201
Change-Id: Ief9430c58254fe8cbdcedc8d3678c61d4c086f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-29 16:31:35 +00:00
Joshua Litt 20faaa5d94 [dart2js] Move dart2js unit tests to pkg/compiler/test.
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 18:51:11 +00:00
Paul Berry 2e261f9386 Migration: add locations to trace entries that refer to elements.
Bug: https://github.com/dart-lang/sdk/issues/41402
Change-Id: I0dc59ae9d64c6e8ab470b2ddcb5fd42557ba5704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148742
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-27 21:52:14 +00:00
Konstantin Shcheglov a538c7fcc7 Non-nullify context type for FunctionExpression inference.
Bug: https://github.com/dart-lang/sdk/issues/42007
Change-Id: Id75956759c66aa6090ba52e07deb120ce44fd8d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 20:22:20 +00:00
Konstantin Shcheglov 00fa48fbb1 MockSdk does need to create summary.
Change-Id: Id62bc99394e9afd6306ba6a12118d7bcd045a598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 19:39:10 +00:00
Konstantin Shcheglov 860d3c0697 Report UNUSED_LABEL when null safety, fix for crash.
Bug: https://github.com/dart-lang/sdk/issues/42077
Change-Id: I85325ae1f2d25f680182d07ef50ddb56633b89f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 19:36:30 +00:00
Konstantin Shcheglov b6af46dc30 Revert "Use allowed_experiments.json when building SDK summary."
This reverts commit 97d9412996.

Reason for revert: This causes some, probably temporary, issues internally. Reverting for a day or two.

Original change's description:
> Use allowed_experiments.json when building SDK summary.
> 
> Change-Id: I3fd73d9890d62cc7b3c19e061069979a6b65c9b7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149052
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I9c8142bfc5728dd773830b653bb31d28b5e81628
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149201
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 16:26:12 +00:00
Konstantin Shcheglov 97d9412996 Use allowed_experiments.json when building SDK summary.
Change-Id: I3fd73d9890d62cc7b3c19e061069979a6b65c9b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149052
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 15:28:19 +00:00
Parker Lougheed 6489a0c68d Fix error when modifying import on Windows
If there is an exception when checking if a resource exists, it is similar to it not existing. Open to feedback here though, perhaps the issue should be handled more specifically to Windows path requirements.

Bug: https://github.com/dart-lang/sdk/issues/37403
Change-Id: Ic5d4ed0cb22619897c3ccaf46feaadd297b55472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-05-27 05:50:13 +00:00
pq 253022eb1b remove non-node-processing lint support
See: https://github.com/dart-lang/linter/issues/2105

Change-Id: I8895c567813d7757e659f8e0d2c700268eae4a6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149050
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-05-27 00:40:02 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Konstantin Shcheglov 0b3ece9287 Expose FeatureSetProvider from AnalysisDriver for dartdoc.
R=brianwilkerson@google.com

Change-Id: I790737f7538e1104d27b71d0b789e09f22e49e0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149046
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 22:13:35 +00:00
Konstantin Shcheglov fc1a782168 Remove support for '--package-root'.
Bug: https://github.com/dart-lang/sdk/issues/41197
Change-Id: Ia10946b4db2204cc11e78a1d114578ba79904e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:33:32 +00:00
Konstantin Shcheglov 571f564eda Rewrite TypeName to ConstructorName in one place, consolidate error reporting.
Change-Id: I5ea1369d65c5eb47e920f68806d28f34931d372e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-26 21:32:22 +00:00
Parker Lougheed d936b4f88c [pkg/analyzer] Address prefer_collection_literals lints
Change-Id: I2ec7ae41e35f3c42a8cd2c3723cbe58266099f99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148987
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 19:09:00 +00:00
Parker Lougheed 66e2339142 [pkg/analyzer] Address prefer_final_fields lint
Change-Id: I737502b4bbef575ef6d9e0a16c12f43365a5e093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148988
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 19:00:56 +00:00
Parker Lougheed 2e89bcfc7d Fix prefer_conditional_assignment lint suggestions
This is a step towards moving towards the 1.9.0 version of pedantic which includes this lint.

Change-Id: I59a8d8d7a2c377a007cc08fdf7eef8c60203466d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 17:46:08 +00:00
Konstantin Shcheglov 32ab4205e3 Extract resolution of 'new Class.constructor<typeArguments>()'.
Change-Id: Ib2ffb7bc0b5411a087949f797d153eed1710f9e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-25 21:07:49 +00:00
Konstantin Shcheglov c0b4f14360 Use NNBD aware subtype matching rules for inference.
Change-Id: I12133e6e9195817af96d93ce8f39b635d187751a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148946
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-24 19:06:38 +00:00
Konstantin Shcheglov 659bd15f2f Test isEnumConstant.
R=brianwilkerson@google.com

Change-Id: Ie0515c5dea283fbf54fe4e9b0d9708bb89e207b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148961
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-24 18:01:18 +00:00