Commit Graph

8489 Commits

Author SHA1 Message Date
Konstantin Shcheglov c4f3bfb5cb Rename PackagesContent to MockPackages.
We have MockPackages in DAS, although implementation is quite
different. At some point we might want to unify them. But for now
just name it similarly.

R=brianwilkerson@google.com

Change-Id: Id4bb2b16b845368d99260200f1172562362a8beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 20:33:59 +00:00
Paul Berry 01bcfbdc88 External field support: also allow external static fields.
Change-Id: I32008de216d2840f7466176e45b96cab3da4edde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158140
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 19:40:19 +00:00
Paul Berry 490a4b65e2 External field support: suppress "uninitialized non-nullable field" errors.
External fields whose type is non-nullable don't need to be
initialized (in fact they can't be initialized), so we shouldn't
report "uninitialized field" errors for them.

This CL also adds some basic tests of the functionality of external
fields, making sure that the getters and setters they introduce are
properly resolved and that their types are properly respected by
inheritance checks.

Change-Id: I9b08727ab0d45d24801af3721e332c7ec21d08bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-11 19:32:12 +00:00
Konstantin Shcheglov fab57cfeb7 Switch ImportElementsComputer to the new scope.
R=brianwilkerson@google.com

Change-Id: Ieb07dd810274401dca1492619b83fcc9a2a8d9f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158107
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 19:30:12 +00:00
Konstantin Shcheglov 8bf2ae347d Use new Scope in AstRewriter.
R=brianwilkerson@google.com

Change-Id: I755d3815ba9b0c7e638bc2f87bf64593f89baf7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158144
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 17:38:39 +00:00
Konstantin Shcheglov d68227dfe0 Remove PackageMixin.
R=brianwilkerson@google.com

Change-Id: I801d64f919e8e8fded0e08ebc6e9ac2b8ece4b32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 17:20:39 +00:00
Konstantin Shcheglov 4cf5f3c600 Use new Scope in ElementResolver.
R=brianwilkerson@google.com

Change-Id: I44565fbdc71190226d958964e13cc22e5d4f8959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158103
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 15:32:02 +00:00
Brian Wilkerson e224540b1c Unify four diagnostic codes for the purpose of documentation
I would have prefered to have renamed them all to undefined_super_member,
but that would have broken existing links. Some day we should add the
support necessary to allow for forwarding so that we can rename codes.

Change-Id: I81e416407e3464b5b60a4dbbfe60a375eb47bb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157921
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 01:07:44 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00
Konstantin Shcheglov 287c796412 Migrate AnalysisDriverCachingTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: Iafcc25686d1eb70f638347ed4af06e09eb965cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 20:12:13 +00:00
Brian Wilkerson 276f10aaf6 Unify const_field_initializer_not_assignable with field_initializer_not_assignable for documentation purposes
Change-Id: I7b008febe4210d08768b81c59bf0ee6b2663fafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:48:03 +00:00
Paul Berry 87f0d5d9dc Abstract field support: do not allow abstract fields to be late or static.
Although these error conditions are not reported by the parser, the
language grammar does not permit them, so from a customer perspective
they are parser errors.  Accordingly, they have been assigned
ParserErrorCodes and reported by the AstBuilder, as we do for other
similar errors.

Change-Id: I79d0ad1dcad518981b8b649c117df326279008f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:27:13 +00:00
Konstantin Shcheglov 8405d7c8e3 Remove dart2jsHint option, verifier, and tests.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I95b88940c862d463af03e85fcdf0f4bf81c2fbd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 19:19:43 +00:00
Paul Berry 92315c4b2d Abstract field support: do not allow initializing abstract fields.
There are three ways to initialize a field, so we have to check for
three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer

Fixes #42981

Change-Id: Ifc32a28ffb62d60fd2171d4980e88da9eebcb481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-08 13:36:52 +00:00
Konstantin Shcheglov 0aa5b0f019 Files generated for other packages in PackageBuildWorkspace do not belong to the package.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1608caf8fb54187f8154dd1510841f46a247383f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:26:57 +00:00
Konstantin Shcheglov 8ce4d6d6bf Replace 'non_nullable' with 'null_safety' in BUILD files.
The flag was renamed since the original issue was open.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: Ie92d43d09d97386f3e61ad226c0a0c88287d2ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:51:14 +00:00
Konstantin Shcheglov 8a0d5c25ee Use lookup() in VariableResolverVisitor.
Change-Id: I101ba07997cabcfa5fbccc59194acb79d7abf7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:39:36 +00:00
Konstantin Shcheglov 6a5030981c Remove ResourceProviderMixin.newFileWithBytes().
R=brianwilkerson@google.com

Change-Id: I741d75149c1ff7108a458f661eb583b3fd711ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:14:41 +00:00
Konstantin Shcheglov fdef50f096 Support for declared variables.
Declared variables cannot be configured using analysis_options.yaml,
so I put them into AnalysisContextCollectionImpl for now.

R=brianwilkerson@google.com

Change-Id: I2aaa3cfa94ad4a386f0be7d47acc979a89b69b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-07 03:33:39 +00:00
Paul Berry 8b2576fe66 Abstract field support: detect when a concrete implementation is missing.
This CL covers two cases: when an abstract field appears in a concrete
class (which we report as CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, just as
we do for abstract methods), and when a concrete class implements a
class with an abstract field, but fails to supply the necessary
concrete implementation(s) (which we report as
NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_*, just as we do for
abstract methods).

Change-Id: I94bdbafc4ed7b058d9b33b3774e79cb55393380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-07 00:18:09 +00:00
Konstantin Shcheglov c59246d8ad Support for dart_package(non_nullable) in BazelWorkspace.
Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: I927184d9065eb5c54790275a429927de8099a7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157474
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 19:37:12 +00:00
Paul Berry d2c3758cc5 Abstract field support: suppress "final not initialized" errors.
Abstract final fields don't need to be initialized (in fact they can't
be initialized), so we shouldn't report "uninitialized field" errors
for them.

This CL also adds some basic tests of the functionality of abstract
final fields, making sure they don't introduce setters, and that the
getters they introduce are properly resolved and that their types are
properly respected by inheritance checks.

Change-Id: I885f23ce7ca554ba8f48e932ba9d76e128ac0bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157520
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 18:59:52 +00:00
Paul Berry 8076c9efd7 Abstract field support: suppress "uninitialized non-nullable field" errors.
Abstract fields whose type is non-nullable don't need to be
initialized (in fact they can't be initialized), so we shouldn't
report "uninitialized field" errors for them.

This CL also adds some basic tests of the functionality of abstract
fields, making sure that the getters and setters they introduce are
properly resolved and that their types are properly respected by
inheritance checks.

Change-Id: I1fe7b6f40456d03533b85403ec6f428656820706
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157466
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 18:59:52 +00:00
Konstantin Shcheglov 5276973b22 Test and fix for completion in a part.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I7653a24a3a315b2be51e50f223284537e5830b1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157469
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 16:08:59 +00:00
Brian Wilkerson 7997b49285 Clean up a hint in analyzer
Change-Id: Id65f28e22c297737e579f376dfe06d3156595fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157470
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-06 15:55:09 +00:00
Paul Berry 81b90be6be Add support for covariant fields to AstComparator
Change-Id: I82dc56840e2508f3dacd90db0bd41826d0e42e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157463
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 02:46:25 +00:00
Paul Berry b5a3292260 Abstract field support: add a notion of abstract fields to the AST and element model.
In a follow-up CL I will update error reporting logic.

Change-Id: I6fd2916c24a531b1f41bd2872301ffec1fdb8722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157382
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 02:19:46 +00:00
Konstantin Shcheglov d15b04ad04 Switch resolution and many diagnostics tests to AnalysisContextCollection.
Change-Id: I869f61fc102717afb395bd07935ae5e82d46bc56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156983
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-05 21:28:09 +00:00
Brian Wilkerson 76f6423f9e Update the NodeLintRegistry and LinterVisitor to handle some missed classes of nodes
Change-Id: Ie2c6a612fdc1514f49235e28d28b799a78c732f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-05 18:38:19 +00:00
Konstantin Shcheglov 4ac540e21d Check the file digest when reading its content.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Id07652456bd659a37b66f21b052bcef12cbb1c57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-05 15:24:28 +00:00
Brian Wilkerson 363c72111d Update docs to use markdown styled links
Change-Id: Id5b966ee41c75ee02c7ce10609033b81d930697b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157120
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2020-08-05 00:20:32 +00:00
Konstantin Shcheglov ebd5b622ba Add DartSdk.languageVersion
Bug: https://github.com/dart-lang/build/issues/2763#issuecomment-666707445
Change-Id: I8232bd395abc9efea0e5c27716450d6a5442b3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156489
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-04 21:01:09 +00:00
Konstantin Shcheglov 7723fbb46d Don't report DEAD_CODE hint for all required switch/case statements when legacy.
Bug: https://buganizer.corp.google.com/issues/162213706
Change-Id: I2ad6807194a974e6dc40f5f1cdd17f23196371a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-03 21:11:02 +00:00
Konstantin Shcheglov 365525432a Issue 42788. Report MISSING_REQUIRED_ARGUMENT for 'call'.
Bug: https://github.com/dart-lang/sdk/issues/42788
Change-Id: Icece8f0e9865e659187d556c582929efcb7d242e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-02 19:44:23 +00:00
Sam Rawlins d169af6f7d Analyzer: remove unnecessary this
Change-Id: I85a769e0c32159ac2a6422d3a60d160bda40d9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:16:31 +00:00
Sam Rawlins ad5bcf16f1 Analyzer: remove unnecessary this in lib/src/summary,2
Change-Id: I110ffd76b1d04f83bbe08b79937c2ef6d02987a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:12:11 +00:00
Sam Rawlins b8ce4baf7e Remove 'checked mode' from checked_mode_compile_time_errors
Change-Id: I6576eb186149d540ce2dbc0e0aab7177ff4727be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 19:20:58 +00:00
Brian Wilkerson 4776ac1f89 Fix a couple of recently introduced hints
Change-Id: I68b653ea44e548a2789f7e720d6abfddb7cfb08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-31 17:33:58 +00:00
Sam Rawlins ea6bde577d Analyzer: remove unnecessary this in lib/src/generated
Change-Id: I2fb3d84e054bce192604690804f321723730e19f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156603
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 03:37:05 +00:00
Sam Rawlins 9f49ef9d82 Strict-inference: be lenient on @optionalTypeArgs classes
Fixes https://github.com/dart-lang/sdk/issues/42882

Change-Id: I01c7b12cdb36d06ab9d44fb080b15b30684cba3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-30 22:48:04 +00:00
Konstantin Shcheglov caaa2a752b Add TypeVisitorWithArgument and DartType.acceptWithArgument().
Bug: https://github.com/dart-lang/sdk/issues/40478
Change-Id: I2a8d196bf3ba41f771e390acb7eade5cdd5f1e6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 21:33:04 +00:00
Konstantin Shcheglov bd528bfbd6 Updates and tests for ReplaceTopBottomVisitor, fix hints.
Bug: https://github.com/dart-lang/sdk/issues/42196
Change-Id: If9350ccc4ad2908a2c7cde7281fe9e2f01c52f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 19:12:38 +00:00
Mike Fairhurst c9ee369a7c [analyzer] Fix #41926 super bounded types broken for NNBD
`DartType.replaceTopAndBottom` needs to do different things for
NNBD/legacy code. Move this behavior into TypeSystemImpl with its own
responsible visitor.

Fixed: 41926
Change-Id: Ib0eca2384276998d5fdf99f2d9a210d86c999afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156443
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 16:37:48 +00:00
Konstantin Shcheglov fb0578159e Convert paths to absolute and normalized in analyzer_cli arguments.
See https://github.com/dart-lang/linter/pull/2189#issuecomment-665984938

Change-Id: I6becb616dd8bcb0c9945ea5ad5ac6119bb93e330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 15:00:58 +00:00
Sam Rawlins f925019c5a Add tests for strict-inference on instance creation, fix constructor name
Fixes https://github.com/dart-lang/sdk/issues/42881

Change-Id: I0f21f106936e88c9e195fd789408ec590ee4f44d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156423
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 14:55:38 +00:00
Konstantin Shcheglov 3cb837ab54 Remove classes from InheritanceManager when remove libraries from LinkedElementFactory.
Change-Id: I4e5e824d0aa10838d0a717cae86d01db9a609dca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156422
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 07:34:02 +00:00
Mike Fairhurst 59600f2b46 [analyzer] Improve existing non-generative constructor errors
As opposed to the parent CL which creates a new error for cases where no
non-generative constructor is available at all, these improvements
include a bugfix to the previous error message.

The previous message was incorrect in saying 'expected {0} but factory found',
because the argument passed to '{0}' was the factory constructor that
was found, rather than any kind of expected constructor signature.
Fixed.

Also, for implicit constructors, break out the error message to
deliberately explicitly describe that this affects the implicit
constructor.

I considered making an error code for implicit super initializers as
well, (ie `class Foo extends Bar { Foo(); }`), but don't think it is
necessary/common/etc.

Change-Id: I0643ad00abbfb2848cbd2f8f1f83e7c33d4fb846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155831
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 05:12:40 +00:00
Mike Fairhurst e0164ec47e [analyzer] Fix #25874, confusing error for extending Exception.
In the case of extending Exception, the raised error is around the
configuration of the constructors. However, there is no valid
configuration of constructors to be found, and therefore, the better
user facing message is to say that the class cannot be extended as
written.

Change-Id: I5950d438877c450c44cdc914f9f20d7779a64768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 05:12:40 +00:00
Devon Carew 22b05dbf7a [analyzer] fix a grammar issue for invalid_null_aware_operator_after_short_circuit
Change-Id: I7c2548999757e3f8bc314426be7564165c3d9a33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-07-30 04:35:30 +00:00
Sam Rawlins 1dd3fccee9 Update strict-inference to not report 'unreferenced' parameters
This is the implementation CL for
https://github.com/dart-lang/language/pull/599

Change-Id: Icb0af8542a72093a8bdd599c768d5eff46841b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155143
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 00:54:00 +00:00