Commit Graph

10502 Commits

Author SHA1 Message Date
Paul Berry 24b99838f4 Make use of ElementTypeProvider in MethodInvocationResolver
Currently MethodInvocationResolver has a field of type
ElementTypeProvider that is always initialized to `const
ElementTypeProvider`.  In a follow-up CL, I will introduce a code path
that supplies a different implementation of ElementTypeProvider during
migration.

Change-Id: I205558266baacc83cf6e20d37fd6cf7cf489680e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128364
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-14 22:54:15 +00:00
Paul Berry 3ff5053546 Make use of ElementTypeProvider in ElementResolver.
Currently ElementResolver has a field of type ElementTypeProvider that
is always initialized to `const ElementTypeProvider`.  In a follow-up
CL, I will introduce a code path that supplies a different
implementation of ElementTypeProvider during migration.

Change-Id: I9fa0d28c8edeb11a34ca80ee55e32bbf018f6d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128303
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-12-14 22:54:15 +00:00
Paul Berry 441db01e28 Make use of ElementTypeProvider in ResolverVisitor.
Currently ResolverVisitor has a field of type ElementTypeProvider that
is always initialized to `const ElementTypeProvider`.  In a follow-up
CL, I will introduce a code path that supplies a different
implementation of ElementTypeProvider during migration.

Change-Id: Ifd79334243382046f3d19607ab40218410d22270
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-12-14 22:54:15 +00:00
Konstantin Shcheglov ae3973da40 Use FeatureSetProvider in AnalysisDriver.
So that package_config.json can be used to opt-out from context
specified features / experiments.

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

Change-Id: I5e62d733eda6939d66d942eb3d690583f6091a57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128369
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 21:06:04 +00:00
Paul Berry 09a0b040dd Deprecate InterfaceType.lookupXyz, add new InheritanceManager based implementations.
With proposed changes to nullability suffixes and inheritance, we
better consolidate lookups in one place.

Change-Id: Id02fd9a470ea83e83af061b1d92fdbc90092a1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127721
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-12-14 14:22:26 +00:00
Konstantin Shcheglov 6c99171686 Report CompileTimeErrorCode.EXPORT_LEGACY_SYMBOL
Change-Id: Icd43121a4d7f20fdecc1bff8ced6b9378ce94149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128377
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 01:14:55 +00:00
Sam Rawlins 40718899fe Fix pedantic 0.9 lints around collection literals and spreads
Change-Id: I64277c36fbeb4ea7a1bb429a8e0a40203520c883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128380
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 00:15:41 +00:00
Konstantin Shcheglov 92f3447eb1 Replace using \n with multiline strings.
R=brianwilkerson@google.com

Change-Id: Iae3f4c3eef3e944e32515a8c029ddc60a01d47ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128375
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-13 22:00:59 +00:00
Konstantin Shcheglov 0fbce8238d Remove NameFilter.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I684bda477d35b40fc812113e126d1f4ad70302b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128371
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-13 20:33:11 +00:00
Konstantin Shcheglov 8c767c32f2 Remove JavaSystemIO.
Change-Id: I5f3243534cc6b5e71bb0c76753adff2c636f812d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128370
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-13 20:31:21 +00:00
Brian Wilkerson 43066c9911 Add newly reviewed diagnostic docs
Change-Id: I1a090ebd0129040a5fcbf2fca3919c6e22cf1daa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-13 17:55:29 +00:00
Konstantin Shcheglov 8a29e6b830 Remove DevCompilerResynthesizerBuilder from analyzer.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I330c575531dfeddbb82b4512950677f323adec20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-13 15:31:28 +00:00
Konstantin Shcheglov f14301b0df Stop supporting _sdkext, look for _embedder.yaml only in sky_engine package.
Change-Id: I20d30ef0e07ec617d5d8b9fb2e5fb97a7fc9930f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-13 02:15:28 +00:00
Konstantin Shcheglov b3c2eb9f69 Stop setting AST properties for DDC.
Change-Id: Ia3fd639497b65844d386e06131dd729aa76c6a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128111
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-12 23:54:41 +00:00
Konstantin Shcheglov e51702a7a1 Issue 39752. Fix for promoting TypeParameterType twice.
Bug: https://github.com/dart-lang/sdk/issues/39752
Change-Id: Idbb1a3b11d8eb6bdb05a2916d224a4d3e08a5b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128240
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-12 21:35:29 +00:00
Konstantin Shcheglov 3172748cb0 Remove ResolverProvider, and its using for fileResolverProvider / packageResolverProvider.
It does not look that these are used anymore.

Change-Id: Ieafecc306dbf2b53e3366b1ffadc34aa7ba416a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128081
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-12 19:54:51 +00:00
Konstantin Shcheglov b32922ab9c Fix TODO in lint/analysis.dart
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I3621f5a47c821b8cec22bfb6de298d3a748d6b37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128222
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-12 18:23:01 +00:00
Konstantin Shcheglov 3389b3bd32 Remove Packages from SourceFactory.
We have PackageMapUriResolver, this should be the way to resolve
all `package:xyz` URIs. We should not repeat it in SourceFactory.

Change-Id: I52d33dbf7e2d44f2c53521f6a51b0aea70507d3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128106
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-12 17:10:00 +00:00
Konstantin Shcheglov dfc268671f Packages configuration abstraction on top of .packages or package_config.json files.
I plan replacing all references to package:package_config with this
new abstraction in future CLs.

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

Change-Id: Ifbe2c6a16f12cbf32f895505b16857a790610f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128102
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-11 20:52:38 +00:00
Konstantin Shcheglov 191df1ff71 Implement NORM.
https://github.com/dart-lang/language/blob/master/resources/type-system/normalization.md

Change-Id: I51d74045a7c50e546427767fcfbc7a28c1986ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-12-11 17:47:17 +00:00
Konstantin Shcheglov b305a5cef1 Implement parsing for package_config.json files in analyzer.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Idb1ae19327df2bb2388fb585aecc7269edfdf66e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-11 17:01:27 +00:00
Konstantin Shcheglov 7e6c130ed6 Extract nullability TypeSystem tests.
R=brianwilkerson@google.com

Change-Id: I6dbfa4f92f83d7a595d979e614c33f62233df5be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128012
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-11 16:53:49 +00:00
Sam Rawlins c01b52cb0f Remove duplicate 'DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS' already reported by fasta
Fixes #39524

Change-Id: Iaf1c095a9f80809cb8b7e0edd966ab1b22c89abc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-11 16:22:48 +00:00
Paul Berry 06c60481da Create null-aware companion methods for ElementTypeProvider.
These methods are extension methods, so this requires bumping the
analyzer SDK requirement to >=2.6.0.

Change-Id: I2e24027f6cf54520a875dfba60bf85a3644b9fac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-11 14:47:29 +00:00
Sam Rawlins bd008dd1e4 Allow empty URI strings in library directives
Fixes #38859

Change-Id: I1698b09bfee367634782f6f7c61f1dbda22edc0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127600
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-12-11 02:20:16 +00:00
Konstantin Shcheglov 74cc764c06 Issue 39598. Make UNNECESSARY_NULL_AWARE_CALL and other warnings.
UNNECESSARY_NON_NULL_ASSERTION
UNNECESSARY_NULL_AWARE_SPREAD
UNNECESSARY_NULL_AWARE_CALL

Bug: https://github.com/dart-lang/sdk/issues/39598
Change-Id: I74c22ad2c63caf7bf6f3d2f8d02a40ef568b242b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127742
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 23:06:36 +00:00
Konstantin Shcheglov e22ddd1372 Update TypeSystemTest to reuse more ElementsTypesMixin.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I1ceb8a7fe429f194e7ff418105517b96917ce6df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 19:10:45 +00:00
Konstantin Shcheglov 1cc5d6927a Deprecate ErrorReporter.reportTypeErrorForNode()
We always want to convert DartType(s) to their String presentations
using getDisplayString(), never using toString(). Also it is OK  to do
some processing during error reporting, it should be rare operation.

R=brianwilkerson@google.com

Change-Id: I57b80cdd7e91de2eb0d06aa84e15ffc0f577090b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 18:41:35 +00:00
Konstantin Shcheglov 620dd7dab5 Use just DartType.getDisplayString() in ErrorReporter.
R=brianwilkerson@google.com

Change-Id: Iaddf2e8cb9fb69dab3542766e8bc6bb82e9d726f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 17:02:35 +00:00
Paul Berry 6a16a59d08 Additional fixes to analyzer pubspec.
This should address the remaining issues in #39711:

- Analyzer tests use the `matcher` and `test_api` packages, so we need
  to list those as dev_dependencies in the pubspec.

- The `author` field of the pubspec is no longer used.

Bug: https://github.com/dart-lang/sdk/issues/39711
Change-Id: I83b52ee5d90f86a8248a87a41bd5e42e106c19f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-10 16:20:15 +00:00
Paul Berry bb8bece3bf Widen the analyzer's pubspec constraint on _fe_analyzer_shared
Note that this means we now need to be careful to bump the version of
package:_fe_analyzer_shared when making breaking changes to its API.
Hopefully when making a breaking change we can remember to bump
package:_fe_analyzer_shared to a "-dev" version.  However, as a safety
check, I've added a note to my process for publishing
analyzer/_fe_analyzer_shared to pub, to double-check for breaking
changes and update version numbers appropriately.

This should help address #39711.

Bug: https://github.com/dart-lang/sdk/issues/39711
Change-Id: Icd942bc4e7dc619d44f00369ed447e0cffb8d712
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127682
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-10 16:20:15 +00:00
Konstantin Shcheglov 9456316b51 ErrorReporter should know isNonNullableByDefault.
So, when we call DartType.getDisplayString() we know if the type
presentation should include nullability suffixes.

This fixes many, but not all places where we need to present types.
There are places where we don't go through ErrorReporter, but call
ErrorListener directly. I plan to replace all these with ErrorReporter.

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

Bug: https://github.com/dart-lang/sdk/issues/39651
Change-Id: Ic77a556e7834d8f757c8b13eed37ed1d34f47348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-10 01:31:22 +00:00
Konstantin Shcheglov b296d55c55 Issue 39709. Disable implicit 'call' tear-off for nullable objects.
Bug: https://github.com/dart-lang/sdk/issues/39709
Change-Id: I5dcb139f99d3d1e7ef43c6e463e01b665e655b77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-09 22:22:44 +00:00
Konstantin Shcheglov ded753a397 Use 'isNonNullableByDefault' as the flag name everywhere.
We used different names at different places, I propose using this
single name everywhere. Hopefully I updated them all.

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

Change-Id: I0fea2799b9a40526c4f0194a8a81812bdf788c90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127722
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-09 22:19:47 +00:00
Konstantin Shcheglov 86723cd5b1 Remove unused private methods and explicit 'new'.
R=brianwilkerson@google.com

Change-Id: I8850fbaa67aad479f8327b7806c5e98aa70e7e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-09 22:19:27 +00:00
Paul Berry de0e432ef1 Create an abstract layer to customize querying element types.
This will be needed for the NNBD migration engine.

Currently only used in checker.dart.  Later CLs will convert the
resolver to use this abstraction layer as well.

The runtime overhead of this abstraction should be negligible, since
under normal analyzer operation, there will only be a single const
instance of this class, and no instances of any subclasses.  So the VM
should be able to trivially inline all uses of the abstraction layer.

Change-Id: I0132b76238606e6e6b789169a62806d09f10f71d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127490
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-09 19:17:49 +00:00
Brian Wilkerson 5f7177db84 Handle two non-operators as if they were operators to prevent a failure when assertions are enabled
Change-Id: Ia2011d240866ac9f569aa9aacc374e33c89d74d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-09 19:07:39 +00:00
Konstantin Shcheglov bafd4e8dc6 Issue 39668. Use 'read type' to check dead '??='.
Bug: https://github.com/dart-lang/sdk/issues/39668
Change-Id: I20bd3ae7806b409d6c4b9b72b4968651db207ea4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-09 18:19:29 +00:00
Paul Berry ffd757640d Duplicate kernel package's graph.dart in analyzer, and prepare to publish 0.39.2+1.
Analyzer has dropped its dependency on kernel, so we can no longer
share this code.

This will allow us to re-publish analyzer and address issue #39702.

Bug: https://github.com/dart-lang/sdk/issues/39702
Change-Id: I20c3505c450dddb1e833fa6e56291ab39c32fe0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-12-08 23:49:27 +00:00
Sam Rawlins 9f2be5cadf Move tests for 6 more diagnostic codes to the diagnostics/ directory
Change-Id: I291754287ff01baf86031960a3c4f260a9fc5df9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-12-07 17:31:45 +00:00
Sam Rawlins 159c6da02a Add test for a @required field formal
Related to #37266, but doesn't address it.

Change-Id: I51114c2b67dcd6f62b5b237998eafab49d2fc369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127543
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-12-07 17:18:05 +00:00
Konstantin Shcheglov 52dc7690ef Issue 39667. Use flow analysis in IfElement.
Bug: https://github.com/dart-lang/sdk/issues/39667
Change-Id: I4528869a8d39d1b27c0cdf21ab20173bdb0efbc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127482
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-12-07 03:32:14 +00:00
Konstantin Shcheglov c17aff87e1 Restore skipping all dynamic type arguments in DartType.displayName
There is one internal client that currently depends on such presentation.
This will unblock rolling analyzer, then we will fix the client, and
remove this skipping code in analyzer.

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

Change-Id: I0d6387892d12326d658800069dd8a60faa589405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127488
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-07 02:24:34 +00:00
Konstantin Shcheglov f024d9dcce NullabilityEliminator - Never to Null*, remove required from formal parameters.
Change-Id: I3ad2cf15c2ed1e8eb347ac84c9dc401e807e2e7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127203
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 23:28:09 +00:00
Konstantin Shcheglov b92cd2cb95 Deprecate DartType.displayName, use getDisplayString() instead.
We call it with `withNullability: false` almost everywhere.
My attempt to update all places turned out to be a long chain of
changes. So, instead I will make decisions and updates in separate
CLs, starting with ErrorReporter.

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

Change-Id: I9d72475577ba2934bed1c06a4808ab620e92a20e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127441
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 22:43:59 +00:00
Sam Rawlins 0939101320 When reporting unused elements, do not count a CommentReference as usage
Fixes #37116

Change-Id: I9ac563036a367a5e5da4fbba8ab521f174062570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127223
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-06 22:36:54 +00:00
Brian Wilkerson 652926bbaf Deprecate Element.getAncestor, replacing it with methods matching those in AstNode
Change-Id: Iebb046791c1fce57a228f997e9c5936809fbc872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127481
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-06 18:29:02 +00:00
Paul Berry d85eccb186 Prepare to publish analyzer 0.39.2.
Change-Id: I502e5256eb9f469e2d18a911624a3f8ebf0df972
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127440
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2019-12-06 17:46:20 +00:00
Sam Rawlins 3281a4ab7f Move tests for 10 diagnostic codes to diagnostics/ files
Change-Id: Ic5e4f344c17b2c18c134b816a771fb61732dd934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127452
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-12-06 16:00:10 +00:00
Konstantin Shcheglov 4b21941d33 Fix prefer_iterable_wheretype in analyzer.
R=brianwilkerson@google.com

Change-Id: Id683ec62a7bdfddb5b2662afbcf57d884767a736
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127454
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-06 15:54:10 +00:00