Robert Nystrom
361cf93984
Reformat tests/language/a-e using 3.8 style.
...
Change-Id: I5cfab9212bb78809967de323b60ebb06913b84d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425149
Auto-Submit: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2025-04-29 07:38:43 -07:00
Robert Nystrom
6cc9efe290
Reformat tests/language/c*.
...
Change-Id: I94dfcea40566190c6bf153c108b0d0d5dbf27a4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400148
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
2024-12-12 15:50:08 -08:00
Parker Lougheed
c73677e606
[tests] Minor spelling and grammar fixes
...
Change-Id: I18c309b9037cf94a883443ac9067f911f829516c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388945
Reviewed-by: Lasse Nielsen <lrn@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2024-10-09 08:38:48 +00:00
Konstantin Shcheglov
21cfe2ce61
Breaking changes for analyzer version 6.0.0
...
Change-Id: I792c3d66fb10ab779e2a5011b2909efa5738aba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265183
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2023-06-16 16:31:27 +00:00
Sergey G. Grekhov
82b78916fd
[tests] Remove obsolete Dart 3.0 experiments from language tests
...
Change-Id: If31c487e3ebe2c1ae847aff7c8994580b8b6f2f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309660
Reviewed-by: Alexander Thomas <athom@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
2023-06-15 08:26:27 +00:00
Kallen Tu
0b03e711bf
[cfe] Change error message for mixin subtype restriction.
...
Make better error message for mixins since they can't be final nor
sealed.
Bug: https://github.com/dart-lang/sdk/issues/52697
Change-Id: I56a9cb66131c0a47ea1c91b95dcf70d12835134e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308964
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-06-14 14:28:48 +00:00
Kallen Tu
9c34ff75db
[analyzer] Produce error when omitting base/final/sealed on base/final superclasses through legacy libraries.
...
When a post-feature library implements a pre-feature library declaration that has a final core library class as a super declaration, it should not produce a base/final/sealed transitivity error. Subclasses of a base core library class will still emit this error.
Otherwise, if base/sealed/final is omitted in a non-implement case, we want to report these errors.
Bug: https://github.com/dart-lang/sdk/issues/52315
Change-Id: Icdd4f63f69b061be5eabc7fd30b703d0358018a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302365
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-05-10 22:05:59 +00:00
Kallen Tu
ea21df9dbe
[cfe] Disallow implementing a legacy library subclass of a final/base class in the core libraries.
...
This behaviour should only happen when a post-feature library implements
a pre-feature library declaration that has a final/base core library class as a super declaration.
Bug: https://github.com/dart-lang/sdk/issues/52115
Change-Id: If42129ba3ba7e337cc6ffc21604c6d0f2976344c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301503
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-05-10 14:31:50 +00:00
Kallen Tu
6de1afdb3a
[analyzer] Disallow implementing a legacy library subclass of a final class.
...
Checks an interface's supertypes for final classes and produces an error if the implementing bypasses a legacy library.
This behaviour should only happen when a post-feature library implements
a pre-feature library declaration that has a final class as a super
declaration.
Similar error to https://dart-review.googlesource.com/c/sdk/+/298320
Bug: https://github.com/dart-lang/sdk/issues/52078
Change-Id: Ie16edb2b231957dad7502fdab3d5faba93bc6773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300861
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-05-08 23:16:53 +00:00
Lasse R.H. Nielsen
7536f86775
Add tests for behavior of class modifiers through legacy libraries.
...
Change-Id: Iebdedf29cfe90c927c84af1564764ce6477d53af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301442
Reviewed-by: Kallen Tu <kallentu@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2023-05-08 15:05:11 +00:00
Kallen Tu
95565e28e2
[tests] Language tests for errors when implementing a 2.19 class that implements a core library base or final class.
...
Bug: https://github.com/dart-lang/sdk/issues/52078
Change-Id: If97895b9560475f11e8236de87ad5880bdee97c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300880
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-05-04 20:53:42 +00:00
Leaf Petersen
806ba0a0ca
Update base transitivity error messages for the CFE.
...
Change-Id: I036d17deb110559b35c043e1cd660dbcafffed1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300324
Auto-Submit: Leaf Petersen <leafp@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Kallen Tu <kallentu@google.com >
2023-05-02 18:23:49 +00:00
Johnni Winther
2a82ba0f48
[cfe] Report error on indirect implementation of base class
...
Closes #52161
Change-Id: I9e2f441036cfeeb904a3e3ec5aeff2e5c45cb8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298160
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2023-04-26 08:16:34 +00:00
Leaf Petersen
5138a1eb38
Add test cases to cover implementing a base declaration from the
...
current library which itself extends a base declaration from another
library.
Change-Id: I3caf125de528d5c082c825c02055a114f732f385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298040
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
2023-04-25 21:59:46 +00:00
Kallen Tu
2954986a7e
[parser] Add errors for using class modifiers on enums.
...
Otherwise, in its current state, there's no clear error for any modifiers when used before an enum declaration.
This follows the same format to FINAL_MIXIN_CLASS and those groups of errors.
Bug: https://github.com/dart-lang/sdk/issues/51935
Change-Id: I8174b6894c95fef5c0f4704927b161942c19d3ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294122
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2023-04-13 14:59:57 +00:00
Kallen Tu
f7bc72fce6
[analyzer/cfe] Remove interface mixin, final mixin and sealed mixin.
...
Added error messages for when users try to use invalid mixins + a language test that tests that (and tests in each of the front ends).
Removed the tokens from the parser listeners.
Removed all behaviours and error reporting related to these invalid mixins.
Change-Id: I558595826dae7e2c176bd1929e97caa2335c167c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290614
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-03-30 11:56:08 +00:00
Kallen Tu
f76f84c850
[cfe] Report error when sealed or final used in on type outside of library.
...
Then when using a final class in an on clause outside of its library, we don't produce a base/final subtype error.
Change-Id: Ib96efefb04639496daeee0de98c5711e73709ac5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291591
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-29 12:09:23 +00:00
Kallen Tu
6779635eb0
[cfe] Only report base/final subtype errors on the nearest problematic subtype.
...
To match up with analyzer behaviour, we want to only report subtype errors
on the first erroneous subtype instead of every subtype down the tree.
Change-Id: Ifb93ef39498e93d075a475fff8939017b563414e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291344
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-03-28 19:07:57 +00:00
Kallen Tu
e0ab0d1be5
[analyzer] Report error when sealed or final used in on type outside of library.
...
Also, when using a final class in an on clause outside of its library, we don't produce a base/final subtype error.
Change-Id: I6600bc136ca37e98f9698c604214a6c565d6a9af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-27 22:33:29 +00:00
Kallen Tu
fd1b48d82e
[tests] Remove interface mixin, final mixin, and sealed mixin from language tests.
...
Change-Id: I8d92758c3a43ed0eff2e0c953ae8a87e65a3a920
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291047
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2023-03-24 23:04:47 +00:00
Leaf Petersen
386825ee8c
Add tests for the transitivity of the base modifier when applied to
...
base mixins and base mixin classes.
Change-Id: Idfe7576f38382c5e9a0ff968aae00f48990e1d38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290351
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
2023-03-24 21:59:23 +00:00
Kallen Tu
24d210a18c
[tests] Fix existing on clause tests for final classes.
...
Disallow using final classes on on-clauses outside of its library.
Update tests to show this behaviour. (Or at least in a state where I can test out the implementation)
Change-Id: I74306c873dbd047c6b94d8e8e75c215562dd9483
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290915
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2023-03-24 18:07:52 +00:00
Kallen Tu
2e19faaec9
[cfe] Report an error when implementing a base class through a sealed class.
...
Bug: https://github.com/dart-lang/sdk/issues/51811
Change-Id: Ifad0519332965d79719173702293b48e94231024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291040
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-24 17:09:09 +00:00
Kallen Tu
66c1b0db50
[analyzer] Report an error when implementing a base class through a sealed class.
...
Bug: https://github.com/dart-lang/sdk/issues/51810
Change-Id: I478eff8484fa5d3bddfb9cf1c744e6d65a72f6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-23 22:06:01 +00:00
Kallen Tu
c7cee7fd46
[tests] Update tests where analyzer mixin applications were failing.
...
Bug: https://github.com/dart-lang/sdk/issues/51808
Change-Id: I0c3951ab28f96cf1794e0ac1088c975c11935bf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290660
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2023-03-22 22:51:34 +00:00
Leaf Petersen
da7ef9a661
Tests for transitivity of base.
...
Test that all subtypes of classes marked base/final are required to be
base/final/sealed, and that base/final classes may not be implemented
outside of their own library. Also test restrictions on sealed and
interface classes.
Change-Id: I15314a34b684bbec5a16b8ae228ca7de08f8498a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290100
Reviewed-by: Erik Ernst <eernst@google.com >
2023-03-21 20:31:00 +00:00
Kallen Tu
fde66e95bd
[analyzer] Mark induced modifiers on sealed types.
...
Changed the classes to store induced modifiers on `isBase`, `isFinal`, and `isInterface`. If one of these getters are true and `isSealed` is true, then we assume it's an induced modifier. (Since a class or mixin cannot be both sealed and another modifier).
There's a subtle change here where the induced modifiers are only marked on sealed classes which means that classes that subclass/subtype non-sealed classes won't get any base or final errors. This will also affect how lints will be reported -- at the next erroneous subtype and not downstream from that type.
Also, the context messages now point to the class with the explicit modifier inciting the error.
Bug: #51671
Change-Id: I4c7541d956382dcb3917a4b8d73756840880c52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289406
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2023-03-20 22:26:26 +00:00
Konstantin Shcheglov
af05d71857
Separate MIXIN_CLASS_DECLARATION_EXTENDS_NOT_OBJECT from MIXIN_INHERITS_FROM_NOT_OBJECT.
...
Change-Id: I407540e20c1149203d1109920b3405d37df20423
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2023-03-20 21:41:58 +00:00
Kallen Tu
08c492f119
[cfe] Allowing pre-feature libraries to mix in classes in core libraries.
...
Also, quickly fixes sealed error along the way.
Change-Id: Id40e86a434d2d3930ae69d9ee2c7ffe6fc4cb0e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287921
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-03-14 18:28:42 +00:00
Leaf Petersen
34531dcdf2
Tests for mixin class legacy interactions.
...
Change-Id: I2d2c3353f77b96d656bc81dc5f59bd7021ed2861
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287665
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Kallen Tu <kallentu@google.com >
2023-03-10 06:02:34 +00:00
Kallen Tu
22de5b34f2
[cfe] Report an error when a subtype of a base or final type is not base, final or sealed.
...
Change-Id: I54c9e3edcc0ae7e61f48ff7e3b42d83e0556af7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286101
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Derek Xu <derekx@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-01 19:10:56 +00:00
Kallen Tu
4f6ccd9fee
[analyzer] Report an error when a subtype of a base or final type is not base, final or sealed.
...
Change-Id: Ie9c943e6ce7d3b1c746ccd4ee3757886dd619c5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-03-01 19:01:59 +00:00
Kallen Tu
efc9ebb215
[cfe] Change location of mixin class constructor errors.
...
Change-Id: Ic9484ca8ccadba8f13588e4e7f5fa781344c27b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285881
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-28 16:46:29 +00:00
Kallen Tu
cef1fab383
[tests] Avoid running backend tests on mixin_class_generative_constructor_error_test.
...
Change-Id: If1eaca1705f27f6a5df199e292a27d610e09495b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285021
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
2023-02-23 22:53:18 +00:00
Kallen Tu
b34f480e0d
Reland "[analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed."
...
This is a reland of commit f17e9732c5
Original change's description:
> [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
>
> Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
> Commit-Queue: Kallen Tu <kallentu@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
Change-Id: Ic8185f38477b2eeff624ee391868d7260e0ed4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284486
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-22 22:18:51 +00:00
Kallen Tu
16b1c12619
[analyzer] Disallow classes to be used as mixins even inside the library.
...
Change-Id: I62aaf972a16cdd678f5711a41dc1652b89d0be37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283131
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-02-21 19:32:44 +00:00
Kallen Tu
f385641fd4
[cfe] Disallow classes to be used as mixins even inside the library.
...
Change-Id: I388a4fabb4ba6267c2ed6f276ef796d9c90dc14d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283130
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-17 20:41:39 +00:00
Kallen Tu
3118002665
Revert "[analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed."
...
This reverts commit f17e9732c5 .
Reason for revert: Merged this and forgot there were dependencies that needed to be merged first.
Original change's description:
> [analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
>
> Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
> Commit-Queue: Kallen Tu <kallentu@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
TBR=scheglov@google.com ,johnniwinther@google.com ,kallentu@google.com ,dart-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: Ia339aac26ecd20aa8725cc9109919e3cbef6363b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283741
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
2023-02-16 22:10:33 +00:00
Kallen Tu
f17e9732c5
[analyzer/cfe] Report an error when declaring a mixin class with final, interface, or sealed.
...
Change-Id: Ia1393851dffaab55c31d04d4e81bfae83a7bd67f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283126
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-02-16 21:27:28 +00:00
Kallen Tu
50e1400d97
[tests] Fix tests to report an error when classes are used as a mixin, even in the same library.
...
Change-Id: Icdb4c4e87bf3143ea9c37272f27e7eac0c7613a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283129
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-15 15:26:49 +00:00
Kallen Tu
36c6a5c9f8
[cfe] Report errors for non-trivial generative constructors in mixin classes.
...
Allow factory constructors.
Allow trivial const/non-const named/unnamed constructors.
Change-Id: I8ec33b58877acb95ce16de8f8bd2ad29b57795cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282040
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-09 23:58:21 +00:00
Kallen Tu
7acd3ba380
[tests] Language tests for mixin classes allowing trivial generative constructors.
...
Change-Id: I332707692917f28b6f43f1ca41cb8b6c101464fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281521
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-08 21:12:20 +00:00
Kallen Tu
9c86cb80bb
[tests] Update language tests with base/final subtyping loophole fixed and a few enum tests.
...
Change-Id: Id30bbdc4b6eedf0751f725024acbed812a07a4fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280860
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
2023-02-07 03:01:27 +00:00
Kallen Tu
b7d0a982b6
[cfe] Report errors for final class and mixin subtyping outside of its library.
...
Change-Id: I958fd30e2ed37ae3ca4311967575c8176ca2cd48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280249
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-03 01:17:41 +00:00
Kallen Tu
aa7a150bcd
[cfe] Report an error when extending an interface class or mixing in an interface mixin.
...
Change-Id: I23019c69f74f2405f196eac5d58048138bc6408a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280244
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-02 23:23:13 +00:00
Kallen Tu
8cce064bf1
[analyzer] Report errors for final class and mixin subtyping outside of its library.
...
Change-Id: I7fbd0d0e36d360ce1a02cf7c4ecd6ccd2a29c999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280206
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2023-02-01 22:11:39 +00:00
Kallen Tu
6ee64808ce
[cfe] Refactor error handling for all existing class modifier behaviour.
...
Change-Id: I925f008ef3a1522c4e60f283dbdbd0fb5b1e290c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280049
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-02-01 20:08:50 +00:00
Kallen Tu
95c1899b43
[analyzer] Report an error when extending an interface class or mixing in an interface mixin.
...
Change-Id: I868b8c89fa52edbcd05d7f06e3246196bbf3d952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279910
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-01-31 19:18:40 +00:00
Kallen Tu
83a9a0a3f4
[analyzer/cfe] Make sealed and mixin class errors more precise and synced between the CFE and analyzer.
...
Updated corresponding language tests. No new behaviour, updated test messages and location.
Change-Id: Ib3c7e2d701bdfbb68757c532b945348f6cbebad0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2023-01-31 01:53:09 +00:00
Kallen Tu
f48a1fb3da
[analyzer] Report error when implementing a base class.
...
Change-Id: Ia55354350451849a112a32bb048a4fcbe5afe1b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279655
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-01-26 22:15:57 +00:00