Currently, Dart 2.0 forbids overriding a method with a getter (even if
the types are compatible), so once a method has been torn off, there's
no way to ever call the tear-off through an interface target that is a
method. However, if we ever relax that rule and allow a method to be
overridden with a getter, it will be possible to call a torn-off
method through an interface target that is a method. If this ever
happens, we will need to make sure that the proper covariance checks
occur.
Since overriding a method with a getter is currently forbidden, the
new tests verify that the expected compile time error occurs.
However, to future proof us against the possibility that this
restriction is ever relaxed, the tests also contain enough code to
demonstrate the runtime check that would be needed.
Change-Id: Iea3a56d86f661362ff9fb970bcc80c8f80c50f4e
Reviewed-on: https://dart-review.googlesource.com/5322
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This CL silences several tests for '$compiler = dartkp' configuration
in order to make vm-kernel-precomp-* buildbots greener.
These tests are already silenced for '$compiler = precompiler' or
'$compiler = dartk' configurations.
Change-Id: Ia3208853655868ae4cf39775d40db15218c1a1df
Reviewed-on: https://dart-review.googlesource.com/5286
Reviewed-by: Alexander Aprelev <aam@google.com>
This reintroduces the previously-tested behavior (that a named
constructor can have the same name as a setter) and also cleans it up
and documents it.
Change-Id: Ia4d532a26e081ab150dfd073d1e6909f1b53a9ad
Reviewed-on: https://dart-review.googlesource.com/3386
Reviewed-by: Peter von der Ahé <ahe@google.com>
Request particular attention to generic_creation_test and generic_field_mixin6_test, but all of the following required tweaks
to the status files to pass tests:
generic_closure_test
generic_function_bounds_test
generic_function_dcall_test
generic_function_typedef_test
generic_field_mixin6_test
generalized_void_syntax_test
generic_functions_test
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3008573002 .
Interesting bits:
- Removed some behavior that is now unreachable in the presence of
type errors.
- Made if_null_behavior_test not a multitest since it doesn't need to
be any more.
- Likewise, if_null_evaluation_order_test never needed to be a
multitest.
R=lrn@google.com
Review-Url: https://codereview.chromium.org/3003933002 .
Interesting changes:
- A static getter colliding with an inherited non-static setter is a
compile error, not a type warning.
- Trying to call a setter on what is only a getter is a compile error
with no runtime behavior.
- Add support to test.dart for negative tests in DDC.
BUG=
R=jcollins@google.com
Review-Url: https://codereview.chromium.org/3005643002 .
There were tests that tested only checked mode, having their name on the form xx_checked_xx. Those files have been renamed to static.
We found an issue in the DDC regarding constant maps, the issue has been added to the status file.
R=rnystrom@google.com, whesse@google.com
Review-Url: https://codereview.chromium.org/2994383002 .
generic_instanceof ... getter_closure_execution_order_test.
The main interesting one is generic_methods_type_expression_test. It
was testing old Dart 1.0-specific behavior and needed a lot of changes.
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/3001803002 .
This mainly splits along compiler lines, but uses runtime for a couple
of things -- VM and Flutter mainly.
I did most of the work automatically by hacking up the migration script
to re-migrate the existing file, but I also went through and manually
cleaned the result up as best I could.
R=bkonyi@google.com, jcollins@google.com
Review-Url: https://codereview.chromium.org/2993043002 .