Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov 7d3252800b Infer void return type for FunctionExpression.
https://github.com/dart-lang/language/pull/1092

Bug: https://github.com/dart-lang/sdk/issues/42720

Change-Id: I7ce44a066382c63e22debbcb652a717b5230b267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-17 16:03:00 +00:00
Sam Rawlins 907da64b02 Analyzer: Redefine NOT_INSTANTIATED_BOUND to be an error.
All StrongModeCodes are being redefined.

https://github.com/dart-lang/sdk/issues/33545

Change-Id: I247c6584eba386edfd7babecb08adf5ccc9344ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154748
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-17 13:42:58 +00:00
Konstantin Shcheglov 058fa167c8 Implement LibraryScope as an adapter for the new scope.
Change-Id: Ic69dcec3b7b4263b13909b61dba49b1814116759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154640
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-17 02:35:54 +00:00
Konstantin Shcheglov 9d507c84f3 Replace 'bottom' with LinkedNodeTypeKind.never
Change-Id: I382ae9e4c683357a0c3855d47bf9aaa1912d6aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-17 00:00:44 +00:00
Konstantin Shcheglov 205e8ed056 Fix FeatureSetProvider on Windows.
Change-Id: Ie7a878869570cb7b1f0497c0688c17cb9f221933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154747
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 22:42:34 +00:00
Paul Berry 20e1864133 Allow abstract instance variables in NNBD code.
This is a step toward implementing
https://github.com/dart-lang/language/blob/master/accepted/future-releases/abstract-external-fields/feature-specification.md.

Change-Id: I3c5704b66a171f91589d122d0efe68ed0b9d40ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154740
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 22:02:54 +00:00
Sam Rawlins cceb368fa6 Analyzer: Remove _TopLevelInitializerValidator.flagTopLevel
The task model is gone, so this is not needed. Some of the codes should
not be reported any more, but that is a larger effort, partially
orthogonal.

https://github.com/dart-lang/sdk/issues/33545

Change-Id: I8e5955df33fecefcd6efc926fe69d69dd1b98f51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154745
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-16 21:47:34 +00:00
Sam Rawlins f58ef23d58 Analyzer: Remove unused DYNAMIC_INVOKE code
This code is never reported.

Change-Id: I452e75682c188b4d89e8415f1f4050b2765cd267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154744
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-16 21:46:04 +00:00
Mike Fairhurst 34069eeb10 [analyzer] Fix InterpolationString contentsOffset contentsEnd
Fix relating to https://github.com/dart-lang/sdk/issues/42634, the
incorrect offsets from not tracking first/last properly meant the linter
was using custom logic here:
https://github.com/dart-lang/linter/blob/master/lib/src/rules/unnecessary_string_escapes.dart#L77
but that logic doesn't properly handle unclosed quotes, later producing
range errors in that case.

Landing this will allow me to switch the linter over to this code which
does handle unclosed quotes correctly (for the most part, see the
failing test, that won't cause crashes though), and fix this crash.

Change-Id: Ib58eddf99b6cf7b8b6bf5671fbfe7fbe9122713c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153700
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 20:39:04 +00:00
Konstantin Shcheglov 64deee143a Search for packages using both URI and path.
Change-Id: I96c077514a03ce8472d205cc10f7b67af540e51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 19:09:24 +00:00
Paul Berry 5900c6b2b6 Change DartType.isBottom and TypeSystem.isBottom to match.
The old behavior was:

- DartType.isBottom returned true for `Never`, `Never*`, and `Never?`.

- TypeSystem.isBottom returned true for `Never`, `T extends B`, and `T
  & B`, where B satisfies TypeSystem.isBottom.

The new behavior is:

- DartType.isBottom and TypeSystem.isBottom return true for `Never`,
  `Never*`, `T extends B`, and `T & B`, where B satisfies
  TypeSystem.isBottom.  These are the types that are mutual subtypes
  with `Never`, so it makes sense to treat them all as bottom types.

Change-Id: Iab762684f988025eae231652d43bfde3a0ffe3fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154625
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-16 17:52:23 +00:00
Konstantin Shcheglov f0e54a6657 Deprecate Scope.lookup(), replace it with lookup2().
R=brianwilkerson@google.com

Change-Id: I14074500a4df6803ef362ac1d183bd595e85769f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 16:53:53 +00:00
Brian Wilkerson 9de49b536a Fix an NPE in invalid-null-aware-operator-after-short-circuit
Change-Id: I91ebe5b4c511d74be566ce1f01ae0dba07313057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-16 15:57:03 +00:00
Konstantin Shcheglov 2e05e6c94a Fix for LintDriver and package.
Change-Id: I36347fcac02d214743d2946683036921d17ca10f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154566
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-16 14:55:53 +00:00
Johnni Winther 92f4eb58c8 [cfe] Support abstract fields
Only positive implementation, no error states are checked yet.

Change-Id: Iad79da1dd7e8be9229ee9d47c5301d39ebc3debc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154003
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-16 10:13:23 +00:00
Paul Berry 8cb7dfa70f Modify parser to handle abstract fields.
There is no functional change to the analyzer or CFE yet; we simply
report the error in the parser listeners now rather than the parser
itself.  In follow up CLs when we add full support for the feature, we
will want to keep the error reporting logic, but only report the
errors in pre-NNBD code.

Change-Id: Ifd14dd97d7d1d57586a8e14a25103356d54f0ea1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154364
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-15 22:48:01 +00:00
Brian Wilkerson d4ac7066b7 Improve diagnostic message when short circuiting (issue 42599)
Change-Id: I456bc50792dfdb30c281578d0d54ffa9e2af6474
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-15 21:19:49 +00:00
Konstantin Shcheglov ef147c0a95 Issue 42699. Stop reporting EXPORT_DUPLICATED_LIBRARY_NAMED and IMPORT_DUPLICATED_LIBRARY_NAMED.
Bug: https://github.com/dart-lang/sdk/issues/42699
Change-Id: Ie64405791f15a38f170206a11eabee176b6cbfad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-15 21:03:16 +00:00
Keerti Parthasarathy a2edb7976c Make CiderCacheEntry public.
Change-Id: Ib32b7af6fc399ac5bc646f06175cb68ef605d73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153400
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-15 20:14:55 +00:00
Konstantin Shcheglov 0f14f0e71f Verify the index of IndexExpression with both read and write elements.
Change-Id: Ie680d47c04469d0289b71026a5826a4cd3701ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-15 17:21:54 +00:00
Konstantin Shcheglov b6773035ba Fix for Cider completion in libraries with parts.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I834d27cad96092d32d7c1bacb71fc4584ba3503d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-14 23:58:03 +00:00
Konstantin Shcheglov cd22c5cd21 Catch IO exceptions when resolving a file.
R=keertip@google.com

Change-Id: I0d0539f3730ba2a0f219c5ac9d18ea2107a83b62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154363
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-14 23:01:13 +00:00
Konstantin Shcheglov c3655ed435 Remove FolderBasedDartSdk.defaultSdkDirectory() and getSdkProperty().
It is up to the higher level clients to decide how to find SDK.

It is not API, and is not referenced internally, so we can land it
without going through breaking changes.

Change-Id: Id428519fa9bb3c38368f095c0f358e07f65c45b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-14 18:09:30 +00:00
Konstantin Shcheglov 72bb1d1428 Stop using FormalParameter.kind in analyzer.
So that we could remove it from the public API in a breaking change.

Change-Id: I625bd650d6e6fb4734e40bd8d58ae2142d7fb25e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-14 16:23:09 +00:00
Konstantin Shcheglov 8608726100 Stop supporting 'target?.[index]' and QUESTION_PERIOD_OPEN_SQUARE_BRACKET.
Change-Id: Icac4f851fbb9f283ce28ba8753c1b2e27a99cff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154165
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-14 14:36:19 +00:00
Konstantin Shcheglov 69d11907ec Support for data attachments to OperationPerformance.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I674f2eaa271d9c2bbf9a82831bfeaff1ca765264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154286
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 22:34:19 +00:00
Konstantin Shcheglov 623b5853ad Instrument getAnalysisOptions() for Cider.
R=keertip@google.com

Change-Id: I349a735c00b4e83827310f55379a768c80a05fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154281
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 20:54:09 +00:00
Konstantin Shcheglov 665fb912b7 Remove deprecated CiderOperationPerformance.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Id81e775159fbc691604f62d380c17ba8aced2c99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 20:54:00 +00:00
Brian Wilkerson 58676396ad Fix an npe when Declaration._relevanceTags is null
There are several internal and external issues reported because of this
bug.

Change-Id: Ic166c0cf4ba15148e820878c0305249b4e26c2af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-13 17:48:09 +00:00
Konstantin Shcheglov 388c983495 Add higher level non-API for angular_analyzer_plugin.
Change-Id: I7eb5a3c7e90b9d86c296dafc95b9f9c750c0095a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-13 15:44:59 +00:00
Konstantin Shcheglov eb38d2a03b Add PrefixElement.scope to API.
Change-Id: Ie673f521301d6ddc1b40d86ef7c02544f07e53fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-12 17:11:14 +00:00
Konstantin Shcheglov 93fa1cf17d Add Scope and LibraryElement.scope to API.
Change-Id: I5cfda9ed6c52fde38252d82ee1bc9c9152b906f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-11 06:20:42 +00:00
Brian Wilkerson 082a6e03bd Use element kind to boost the relevance of available declarations
This doesn't significantly improve the overall scores, but it does cause
the element kind to be used for available declarations, which means that
constructors are suggested before classes.

Change-Id: I75e7bb13bd867b9209a43c4d737c5079c42eb25a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154080
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-10 20:08:36 +00:00
Konstantin Shcheglov c367b488ee Add InterfaceType.allSupertypes.
R=brianwilkerson@google.com

Change-Id: I9c5058091b1a4473a2535ba792aa6bbfac35793c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153945
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 16:23:07 +00:00
Konstantin Shcheglov b09dd47d38 Enforce prefer_typing_uninitialized_variables lint.
R=brianwilkerson@google.com

Change-Id: Icfe4a24a6e69ab08f4743502ae88f94ab9cd8c8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153951
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 16:19:07 +00:00
Konstantin Shcheglov 5c1eee9de5 Simplify _InvalidAccessVerifier._hasTypeOrSuperType().
R=brianwilkerson@google.com

Change-Id: I4855170939bf8dc89afdc3dd4d7a91c4819e5667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153948
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 15:10:27 +00:00
Konstantin Shcheglov e52a8beb6b Report error for generators with return type void.
Bug: https://github.com/dart-lang/sdk/issues/32192
Change-Id: Ib31205207def253dc89802898a899b3555ecc28d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153953
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-10 15:09:29 +00:00
Paul Berry 9f8aaf65c7 Issue an error if a prefix in a type name is shadowed by a local variable.
See #42620.

Change-Id: Ifd18c939082935390df0c2aa0bd724cf6f76c27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153705
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 23:09:18 +00:00
Konstantin Shcheglov dfdc7e45c5 Report PRIVATE_SETTER.
Change-Id: I823582328b4b9cc63ac734e9ea1c9354175a6e18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153880
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 21:51:50 +00:00
Konstantin Shcheglov 39c94735a3 Report MIXINS_SUPER_CLASS.
Bug: https://github.com/dart-lang/sdk/issues/42256
Change-Id: I49c70d5a172062fed4d8663d95701ba855effda6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 19:05:52 +00:00
Konstantin Shcheglov 6d65549349 Include all files of the library into ExceptionResult.
R=brianwilkerson@google.com

Change-Id: I53fc35470ab841e602917af78a37f9b1c0e419b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153708
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 15:52:51 +00:00
Konstantin Shcheglov 7a87766f23 Remove bogus features from analyzer.
R=brianwilkerson@google.com, devoncarew@google.com

Bug: https://github.com/dart-lang/sdk/issues/40860
Change-Id: I9ce962b43cc9d0d865a54d0b31a30245e5f7c001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153707
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-09 01:23:23 +00:00
Konstantin Shcheglov 849cdb2ab4 Check for consistency of language version overrides between library and parts.
Change-Id: I209cbcda3d96c4e2f1f7a0352b563c886a22e687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 00:42:42 +00:00
Konstantin Shcheglov aff22600de Use CaughtExceptionWithFiles instead of LibraryCycleLinkException.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Iae70c6453930fca8ef8e2828cf7e3932cc742263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153706
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 00:34:57 +00:00
Konstantin Shcheglov 9dea0a8d97 Add InterfaceType.asInstanceOf(ClassElement) to API.
R=brianwilkerson@google.com

Change-Id: I91c61aea37bb4ccfb300083e1b017b8e71ef6d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-09 00:34:38 +00:00
Konstantin Shcheglov c76fc431c7 Add WorkspacePackage to each FileState.
We need this so that we can look if the file is NullSafe by asking
the package that contains it.

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: I11c71faf7bddd53b458a66f0786454ecd7453b5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153521
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-08 23:54:47 +00:00
Konstantin Shcheglov f2cbec8010 Check for unnecessary_parenthesis in analyzer.
R=brianwilkerson@google.com

Change-Id: I2e8af156a190b51741d60fdb0217101c15306a79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-08 21:46:16 +00:00
Konstantin Shcheglov 9280712d29 Change ConstructorElement.returnType to InterfaceType.
R=brianwilkerson@google.com

Change-Id: I3f2605b26cc953d707dc5c37b690ec0438a99b3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-08 20:01:07 +00:00
Brian Wilkerson 018ded55ed Support setting unique names for lint codes
Change-Id: I815a519ea0278a6ea33c6f8d83ddac4f3cfd2a58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153561
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-08 16:16:54 +00:00
Paul Berry 464641f51a Extend BaselPackageUriResolver to handle files outside of lib.
Generated files can exist outside of `lib`.  In a Bazel workspace
these are referred to using `file:` URIs that point to the generated
code directory.  We need to be able to resolve references both from
the generated code to non-generated code and vice versa.

This is blocking the use of the migration tool in Bazel workspaces,
since the migration tool doesn't have the same level of error recovery
as the rest of the analyzer, so it needs to be able to resolve all
files including generated ones.  But it should also improve the user
experience for using the analysis server in general in Bazel
workspaces, by reducing the number of nuisance "URI not resolved"
errors.

Change-Id: I38dababd29f4490746cc6e1eeede9f438526a815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-08 01:49:40 +00:00