Commit Graph

15 Commits

Author SHA1 Message Date
Sam Rawlins cddd44e1e9 analyzer: Add separate code for concrete implementation override check
Erik wrote a great explanation for this check here:
https://github.com/dart-lang/sdk/issues/37993#issuecomment-757976910

Fixes https://github.com/dart-lang/sdk/issues/37993

Change-Id: I6fb0bd530fac495115314838ec0bb2168d5e9ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180088
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-20 21:27:43 +00:00
Johnni Winther fabf3efda4 [cfe] Refactor ClassHierarchyBuilder to use Tuple for computation
Change-Id: I8055552313786814bde6f66214a013a8bedb2078
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177500
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-01-19 19:52:13 +00:00
Sigmund Cherem b461400e5a [tests] Add regression test for mixin+super+initializer.
This change adds a test to ensure we properly handle super calls in mixin that
override initializers.

This is a regression test for https://github.com/dart-lang/sdk/issues/44636,
which happened to trigger a stack-overflow in ddc.  The issue existed for a long
time, but was fixed in a recent CFE change
https://github.com/dart-lang/sdk/commit/52db62dd65284192755906691baf66c47a43f47e

Change-Id: I7d4aceb8e313f0000e32d9550f301792a9ab84cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178900
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-01-12 22:48:44 +00:00
Danny Tuppeny c818059287 [Analyzer] Report EXTRA_POSITIONAL_ARGUMENTS and EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED against first unmatched argument
Fixes #44598.

Change-Id: I6bccf4f5448de024f27d0ed1ba51c730e22b6fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178020
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-11 18:46:26 +00:00
Johnni Winther 929f59d872 [tests] Add tests for forwarding stubs
This tests were failing prior to the use of mixin super stubs.

Change-Id: I85356a4bf0885e0df9d56cd801f2e2e05dba475f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175140
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-12-29 15:31:05 +00:00
Mark Zhou 38667e5667 [dartdevc] Lazily executing deferred types to prevent improper module reordering.
Supercedes the following (reverted/abandoned) CLs:
  * https://dart-review.googlesource.com/c/sdk/+/162383
  * https://dart-review.googlesource.com/c/sdk/+/165149
  * https://dart-review.googlesource.com/c/sdk/+/165782

Fixes https://github.com/flutter/flutter/issues/66859 and https://github.com/flutter/flutter/issues/64011

Thanks to Siggi for this approach!

Change-Id: I8e496fdb938e18252ec8a0cf7232c99ca8c27080
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166127
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-10-06 21:31:33 +00:00
Mark Zhou 3234534bf9 Revert "[dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred"
This reverts commit 17dba76fb5.

Reason for revert: Replacing this change with a new strategy for better module reordering.

Original change's description:
> [dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
>
> Fixes https://github.com/flutter/flutter/issues/66859
>
> Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=sigmund@google.com,nshahan@google.com,markzipan@google.com

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

Change-Id: I02561ab7e4678392ee96a6132b96c7f0a1499a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165872
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-10-02 23:55:11 +00:00
Mark Zhou 17dba76fb5 [dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
Fixes https://github.com/flutter/flutter/issues/66859

Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-10-01 20:12:20 +00:00
Nicholas Shahan 1d34f60b66 [ddc] Fix missing covariant checks from mixins
Collect all forwarding stubs from anonymous mixin classes and insert
them in the target class if no override exists.

Change-Id: Id62f20b644ce7bbabe114d0d1648664392748a2d
Fixes: https://github.com/dart-lang/sdk/issues/43027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161760
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-16 18:56:58 +00:00
Nicholas Shahan cdd1260ef0 [tests] Move regression test to run on all backends
This same error recently surfaced on a flutter web target.

Change-Id: If4c093cde85887105e93ab46469b1c3b2ea55d03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162243
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-09-14 21:13:37 +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
Konstantin Shcheglov 8de8a1c226 Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
They are all errors now.

Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:15 +00:00
Konstantin Shcheglov ba92b78acd Move errors from StaticWarningCode to CompileTimeErrorCode.
Bug: https://github.com/dart-lang/sdk/issues/42821
Change-Id: I153c48d7a2e4a02026928e6203aacf8f2dc029ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-26 04:19:25 +00:00
Sam Rawlins 32a93e2147 Analyzer: Remove error on class-used-as-mixin referencing super
Fixes https://github.com/dart-lang/sdk/issues/34806

Change-Id: I1cfd0b9c0699734b172aa62f7a04ab533a6cd03f
Fixed: 34806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151099
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-13 15:11:25 +00:00
Robert Nystrom d839eb7bf9 Migrate language_2/mixin to NNBD.
Change-Id: I4501e9a9d2d958cecf21460b628d2ac50a5135bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149492
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-03 00:05:18 +00:00