This reverts commit a0d576e6cd.
Reason for revert: Turned many buildbot builders red. Use the "Choose tryjobs" button to run more configurations on this type of commit. Use the "tools/bots/approve_results.dart" tool to update expectations for builders running the new workflow
Original change's description:
> Add more tests for async*/await-for operations.
>
> Change-Id: I2c8ffb8a6738b8dee43cfdf85be0c54d2735b6cc
> Reviewed-on: https://dart-review.googlesource.com/c/85391
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
TBR=lrn@google.com,leafp@google.com
Change-Id: I81830c3fc565b62e98538feba9bd64c6dd11dd51
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86023
Reviewed-by: William Hesse <whesse@google.com>
This makes us report the following error
* in JIT:
Unhandled exception:
'test.dart': error: Type arguments must be instantiated in partial instantiation.
#0 main (...)
...
* in AOT:
test.dart:7:28: Error: The type '#lib1::C::T' is not a constant, only instantiated types are ...
const C({this.callback = _defaultCallback});
^
test.dart:7:17: Context: While analyzing:
const C({this.callback = _defaultCallback});
^
test.dart:5:37: Error: The type '#lib1::C::T' is not a constant, only instantiated types are ...
void foo([dynamic Function(T) f = _defaultCallback]) {}
^
test.dart:5:33: Context: While analyzing:
void foo([dynamic Function(T) f = _defaultCallback]) {}
^
test.dart:11:38: Error: The type '#lib1::bar::T' is not a constant, only instantiated types are ...
void bar<T>([dynamic Function(T) f = _defaultCallback]) {}
^
test.dart:11:34: Context: While analyzing:
void bar<T>([dynamic Function(T) f = _defaultCallback]) {}
Issue https://github.com/dart-lang/sdk/issues/32912
Change-Id: I05c7019119a50a9cc38939d9cb41aeaa06c853bc
Reviewed-on: https://dart-review.googlesource.com/c/81278
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Declared mixins are not classes and should not be able to be
extended. This was not allowed by the analyzer anyway and since the
mixin declaration feature is not launched, we are not breaking any
code by making this bug fix.
Change-Id: Ia49dd207213accb16ad8dd819a22844d65ccfcab
Reviewed-on: https://dart-review.googlesource.com/c/79524
Reviewed-by: Aske Simon Christensen <askesc@google.com>
class in a foreign library.
This CL changes the predicate which is used to decide whether to
generate noSuchMethod forwarders such that it returns true whenever
the class in question has a user defined no such method or the
enclosing library of the class is different from that of the member.
Closes https://github.com/dart-lang/sdk/issues/33727
Change-Id: I0ffcbb8c8bdd69e4261bcefce2251d31babc19cf
Reviewed-on: https://dart-review.googlesource.com/c/79209
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
When a declared mixin is applied to a class, the class must implement
the superclass constraint interfaces named in the mixin declaration.
Change-Id: I6ace9fe244c1c87860b69c2c5e68f2c31ae73d7c
Reviewed-on: https://dart-review.googlesource.com/c/79206
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.
Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Previously, mixin deduplication transformation expected that isAnonymousMixin
classes could occur only in a superclass position. After this change,
deduplication also handles (canonicalizes) isAnonymousMixin classes in
implementedTypes, as CFE uses isAnonymousMixin classes in implementedTypes
to represent superclass constraints for mixin declarations.
No other uses of isAnonymousMixin classes supported.
Fixes https://github.com/dart-lang/sdk/issues/34704
Change-Id: I8558ce53c4fb1e5a06f839fa5ec8022958d9dafd
Reviewed-on: https://dart-review.googlesource.com/c/78383
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
The code in class_hierarchy.dart that looped over override pairs
included implementations inherited from its superclass as potential
overriders, presumably in a broken attempt to include some interface
checks into the mix.
With this problem fixed, the special case in kernel_class_builder.dart
that excluded overriders not declared in the current class (i.e.
declared in a mixin) could be removed without incurring false
positives.
These override checks performed on members from a mixin produce an
extra context message indicating the class where the two members meet,
giving rise to the override relation (similarly to interface checks).
Since the same member can now override more than one member (or even
the same member more than once), the diagnostics message duplication
check has been extended to also include the context in the comparison.
Fixes https://github.com/dart-lang/sdk/issues/34235
Fixes https://github.com/dart-lang/sdk/issues/34285
Change-Id: I990e5719ae1749fd1aad1ad478aaa6e173cb170b
Reviewed-on: https://dart-review.googlesource.com/c/76900
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
When a member in the interface of a non-abstract class is found to
have an implementation with the correct name which does not override
the representative declaration of the member in the interface (and thus
has not been checked against that member for override validity), call
the override check to check interface validity.
Override relations thus checked produce an extra context message
explaining that the override relation must hold because both members
are inherited by a non-abstract class.
Fixes https://github.com/dart-lang/sdk/issues/32014
Change-Id: I955f057e35fa30f33c19da37c9cea1262042431c
Reviewed-on: https://dart-review.googlesource.com/c/74642
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This is a reland of 7419667d67
I reverted this CL in
https://dart-review.googlesource.com/c/sdk/+/77520 because I thought
it had broken a bunch of bots. It turns out that the bots weren't
broken; they were just erroneously reporting a breakage because some
change-detection code had noticed that there were new failing tests,
and there is not yet a way to tell the change-detection code that the
failures are expected.
Original change's description:
> Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness.
>
> When I implemented super-boundedness for the analyzer in
> b1a54154f8, very little test status
> changed, indicating we didn't have much test coverage for verifying
> that the result of instantiate-to-bounds was appropriately checked for
> super-boundedness. This CL fills in the coverage gap.
>
> Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
> Reviewed-on: https://dart-review.googlesource.com/77010
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Paul Berry <paulberry@google.com>
> Reviewed-by: Erik Ernst <eernst@google.com>
Change-Id: Ic84321e928aaf4c6533e6cf5b9d521a1da77dba7
Reviewed-on: https://dart-review.googlesource.com/c/77660
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This reverts commit 7419667d67.
Reason for revert: Broke a lot of bots. Will investigate tomorrow.
Original change's description:
> Test that the result of instantiate-to-bounds is appropriately checked for super-boundedness.
>
> When I implemented super-boundedness for the analyzer in
> b1a54154f8, very little test status
> changed, indicating we didn't have much test coverage for verifying
> that the result of instantiate-to-bounds was appropriately checked for
> super-boundedness. This CL fills in the coverage gap.
>
> Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
> Reviewed-on: https://dart-review.googlesource.com/77010
> Commit-Queue: Paul Berry <paulberry@google.com>
> Auto-Submit: Paul Berry <paulberry@google.com>
> Reviewed-by: Erik Ernst <eernst@google.com>
TBR=paulberry@google.com,lrn@google.com,leafp@google.com,eernst@google.com
Change-Id: I536c9721a1d79b98b2e3c2a6f7650b134b19f561
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/77520
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
When I implemented super-boundedness for the analyzer in
b1a54154f8, very little test status
changed, indicating we didn't have much test coverage for verifying
that the result of instantiate-to-bounds was appropriately checked for
super-boundedness. This CL fills in the coverage gap.
Change-Id: I8f6fbb3aa4cae1e62861b5eddb113ee9b4bb085c
Reviewed-on: https://dart-review.googlesource.com/77010
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
I'm trying to fix an analyzer bug where typedef type parameters
weren't checked properly, and it appears that we have no language_2
test cases for it.
Change-Id: I216a337eeaae6ac2008c0c26139797e00099ffcb
Reviewed-on: https://dart-review.googlesource.com/76707
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Allow super calls to occur in mixin declarations if they target a
method from any of the superclass constraint interfaces.
Instead of compiling the Dart mixin declaration
mixin M on S0, S1 {...}
to Kernel:
abstract class _M&S0&S1 = S0 with S1;
abstract class M extends _M&S0&S1 { ... }
we compile it to Kernel:
abstract class _M&S0&S1 implements S0, S1 {}
abstract class M extends _M&S0&S1 { ... }
because the former is not symmetrical with respect to S0 and S1. It
will prefer a method from the 'mixin' S1 over one from S0 which can
give a compile-time error if the method from S0 is more general.
Modify mixin inference to support the new compilation of mixin
declarations. It still has to support old-style VM super mixins until
support for those is removed from the VM.
Change-Id: Ib945aa11cc19c457b07bc802beae10d1663ff6b7
Reviewed-on: https://dart-review.googlesource.com/76141
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>