Migrated block 148 to Dart 2.0

R=bkonyi@google.com

Change-Id: I2f455fd681b66c43cbcd873f3d3d278a5ff5c843
Reviewed-on: https://dart-review.googlesource.com/12762
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
This commit is contained in:
Terry Lucas
2017-10-13 04:27:03 +00:00
committed by commit-bot@chromium.org
parent f985f42db5
commit dfa7916418
41 changed files with 253 additions and 47 deletions
+1
View File
@@ -60,6 +60,7 @@ issue_22780_test/01: Pass, Crash # Issue 29094
issue_1751477_test: Crash # Requires deferred libraries
regress_23408_test: Crash # Requires deferred libraries
regress_22443_test: Crash # Requires deferred libraries
regress_28278_test: Crash # Requires deferred libraries
static_closure_identical_test: Pass, Fail # Closure identity
vm/regress_27201_test: Pass, Crash # Requires deferred libraries
vm/optimized_stacktrace_test: Pass, Slow
+9 -1
View File
@@ -815,9 +815,9 @@ enum_syntax_test/05: Fail # Issue 21649
enum_syntax_test/06: Fail # Issue 21649
field3_test/01: MissingCompileTimeError
final_syntax_test/01: Fail # Issue 11124
final_syntax_test/04: Fail # Issue 11124
final_syntax_test/02: Fail # Issue 11124
final_syntax_test/03: Fail # Issue 11124
final_syntax_test/04: Fail # Issue 11124
generic_methods_generic_function_parameter_test: CompileTimeError # Issue 28515
generic_local_functions_test: CompileTimeError # Issue 28515
generic_list_checked_test: StaticWarning
@@ -932,6 +932,13 @@ private_member3_negative_test: fail # Issue 14021
prefix7_negative_test: CompileTimeError
regress_27617_test/1: MissingCompileTimeError
regress_23408_test: Skip # don't care about the static warning.
regress_29025_test: CompileTimeError # Issue 29081
regress_29405_test: CompileTimeError # Issue 29421
regress_29349_test: CompileTimeError # Issue 29744
regress_30121_test: CompileTimeError # Issue 31087
reify_typevar_static_test/00: MissingCompileTimeError # Issue 21565
static_call_wrong_argument_count_negative_test: fail # Issue 12156
syntax_test/none: fail # Issue 11575
test_negative_test: CompileTimeError
try_catch_on_syntax_test/10: MissingCompileTimeError
try_catch_on_syntax_test/11: MissingCompileTimeError
@@ -1459,6 +1466,7 @@ instantiate_type_variable_test/01: CompileTimeError
no_main_test/01: MissingStaticWarning # Issue 28823
no_such_method_negative_test: CompileTimeError
string_interpolate_test: CompileTimeError
reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823
[$compiler == dart2analyzer]
vm/regress_27201_test: SkipByDesign # Loads bad library, so will always crash.
+10 -1
View File
@@ -646,6 +646,8 @@ regress_23089_test: MissingCompileTimeError
regress_23408_test: RuntimeError
regress_26133_test: MissingCompileTimeError
regress_27572_test: MissingCompileTimeError
return_type_test: MissingCompileTimeError
rewrite_implicit_this_test/01: MissingCompileTimeError
runtime_type_function_test: RuntimeError
setter_override2_test/none: CompileTimeError
static_field1_test/01: MissingCompileTimeError
@@ -868,6 +870,7 @@ deferred_constraints_type_annotation_test/type_annotation_top_level: MissingComp
deferred_not_loaded_check_test: Fail # Issue 27577
double_int_to_string_test: RuntimeError # Issue 1533
enum_test: Fail # Issue 28340
final_attempt_reinitialization_test.dart: Skip # Issue 29659
final_field_override_test: RuntimeError
generalized_void_syntax_test: CompileTimeError # Issue #30176.
generic_field_mixin4_test: Crash # Issue 18651
@@ -964,6 +967,8 @@ final_attempt_reinitialization_test.dart: Skip # Issue 29659
mixin_forwarding_constructor4_test/01: MissingCompileTimeError # Issue 15101
mixin_forwarding_constructor4_test/02: MissingCompileTimeError # Issue 15101
mixin_forwarding_constructor4_test/03: MissingCompileTimeError # Issue 15101
regress_28341_test: Fail # Issue 28340
truncdiv_test: RuntimeError # Issue 15246
[ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel ]
covariant_subtyping_tearoff1_test: RuntimeError
@@ -1272,6 +1277,7 @@ field_override3_test/03: MissingCompileTimeError
field_override4_test/02: MissingCompileTimeError
final_attempt_reinitialization_test/01: MissingCompileTimeError
final_attempt_reinitialization_test/02: MissingCompileTimeError
final_field_initialization_order_test: RuntimeError
function_subtype_bound_closure3_test: RuntimeError
function_subtype_bound_closure4_test: RuntimeError
function_subtype_bound_closure7_test: RuntimeError
@@ -1447,6 +1453,7 @@ regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constr
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
regress_28255_test: RuntimeError
regress_28278_test: CompileTimeError
regress_29784_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ok).
regress_29784_test/02: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in () for j:constructor(A.ko).
setter_declaration2_negative_test: Crash # RangeError (index): Invalid value: Valid value range is empty: 0
@@ -1846,6 +1853,7 @@ regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constr
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
regress_28255_test: RuntimeError
regress_28278_test: CompileTimeError
regress_29784_test/01: Crash # Issue 29784
regress_29784_test/02: Crash # Issue 29784
setter_declaration_negative_test: Fail
@@ -1979,7 +1987,6 @@ async_return_types_test/nestedFuture: Fail # Issue 26429
async_return_types_test/wrongTypeParameter: Fail # Issue 26429
covariant_subtyping_test: CompileTimeError
default_factory2_test/01: Fail # Issue 14121
regress_26133_test: RuntimeError # Issue 26429
malbounded_type_cast_test: Fail # Issue 14121
malbounded_type_test_test/03: Fail # Issue 14121
malbounded_type_test_test/04: Fail # Issue 14121
@@ -1987,6 +1994,8 @@ malbounded_redirecting_factory_test/02: Fail # Issue 12825
malbounded_redirecting_factory_test/03: Fail # Issue 12825
malbounded_instantiation_test/01: Fail # Issue 12702
malbounded_type_cast2_test: Fail # Issue 14121
regress_26133_test: RuntimeError # Issue 26429
regress_29405_test: Fail # Issue 29422
[ $compiler == dart2js && !$checked ]
type_argument_in_super_type_test: RuntimeError
+14 -7
View File
@@ -54,6 +54,13 @@ getter_setter_in_lib_test: CompileTimeError
import_core_prefix_test: CompileTimeError # "dynamic" should be defined in core.
import_private_test/01: MissingCompileTimeError # Issue 29920
initializing_formal_final_test: MissingCompileTimeError
local_function2_test/none: RuntimeError
local_function3_test/none: RuntimeError
local_function_test/none: RuntimeError
mixin_super_2_test/01: MissingCompileTimeError
mixin_super_2_test/03: MissingCompileTimeError
mock_writable_final_private_field_test: CompileTimeError # Issue 30848
multiple_interface_inheritance_test: CompileTimeError # Issue 30552
interceptor6_test: CompileTimeError
interface_test/00: MissingCompileTimeError
internal_library_test/01: MissingCompileTimeError # Issue 29920
@@ -66,13 +73,6 @@ library_env_test/has_no_mirror_support: RuntimeError # Issue 30907
library_env_test/has_no_html_support: RuntimeError, OK
library_env_test/has_io_support: RuntimeError, OK
library_env_test/has_mirror_support: RuntimeError, OK
local_function2_test/none: RuntimeError
local_function3_test/none: RuntimeError
local_function_test/none: RuntimeError
mixin_super_2_test/01: MissingCompileTimeError
mixin_super_2_test/03: MissingCompileTimeError
mock_writable_final_private_field_test: CompileTimeError # Issue 30848
multiple_interface_inheritance_test: CompileTimeError # Issue 30552
no_such_method_test: RuntimeError
override_field_test/03: MissingCompileTimeError
override_inheritance_abstract_test/02: MissingCompileTimeError
@@ -118,6 +118,7 @@ regress_27617_test/1: MissingCompileTimeError
setter_override2_test/none: CompileTimeError
stacktrace_demangle_ctors_test: RuntimeError # Issue 31089
string_interpolate_test: CompileTimeError
reify_typevar_static_test/00: MissingCompileTimeError # Issue 29920
super_call4_test: RuntimeError
super_no_such_method1_test: RuntimeError
super_no_such_method2_test: RuntimeError
@@ -152,6 +153,12 @@ multiline_newline_test/04r: MissingCompileTimeError
multiline_newline_test/05: MissingCompileTimeError
multiline_newline_test/05r: MissingCompileTimeError
multiline_newline_test/none: RuntimeError
regress_29025_test: CompileTimeError # Issue 29081
regress_29349_test: CompileTimeError # Issue 31093
regress_29405_test: CompileTimeError # Issue 29421
regress_29784_test/02: CompileTimeError, Crash # Issue 27809
regress_29949_test: RuntimeError # Issue 31086
regress_30121_test: CompileTimeError # Issue 31087
regress_30339_test: CompileTimeError # As expected. Should we make this a multi test?
string_interpolation_and_buffer_test: RuntimeError
string_literals_test: RuntimeError
+6 -3
View File
@@ -21,6 +21,7 @@ hello_dart_test: Crash # error: expected: cls.is_type_finalized()
library_env_test/has_no_mirror_support: RuntimeError
regress_29784_test/01: MissingCompileTimeError
regress_29784_test/02: MissingCompileTimeError
rewrite_implicit_this_test/01: MissingCompileTimeError
setter_declaration2_negative_test: DartkCrash
setter_declaration_negative_test: Fail
setter_override2_test/none: CompileTimeError
@@ -169,6 +170,7 @@ if_null_evaluation_order_test: Pass
if_null_precedence_test/06: MissingCompileTimeError
if_null_precedence_test/07: MissingCompileTimeError
if_null_precedence_test/none: RuntimeError
main_not_a_function_test: DartkCrash
malbounded_type_cast_test/00: MissingCompileTimeError
malbounded_type_cast_test/01: MissingCompileTimeError
malbounded_type_cast_test/02: MissingCompileTimeError
@@ -250,7 +252,6 @@ super_no_such_method5_test/01: MissingCompileTimeError
super_operator_index5_test/01: MissingCompileTimeError
super_operator_index5_test/02: MissingCompileTimeError
wrong_number_type_arguments_test/*: MissingCompileTimeError
main_not_a_function_test: DartkCrash
[ $compiler == dartk && $runtime == vm && !$checked ]
assertion_initializer_const_error2_test/cc02: MissingCompileTimeError
@@ -402,6 +403,8 @@ deferred_type_dependency_test/is: CompileTimeError # Fasta/KernelVM bug: Deferre
deferred_type_dependency_test/none: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
deferred_type_dependency_test/type_annotation: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
dynamic_prefix_core_test/01: RuntimeError # KernelVM bug: Blocked on language issue 29125.
final_attempt_reinitialization_test/01: MissingCompileTimeError # Issue 29900
final_attempt_reinitialization_test/02: MissingCompileTimeError # Issue 29900
function_type/function_type0_test: RuntimeError
function_type/function_type10_test: RuntimeError
function_type/function_type11_test: RuntimeError
@@ -528,8 +531,7 @@ regress_23408_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kern
regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28217_test/01: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28217_test/none: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
final_attempt_reinitialization_test/01: MissingCompileTimeError # Issue 29900
final_attempt_reinitialization_test/02: MissingCompileTimeError # Issue 29900
regress_28278_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
[ $checked && ($compiler == dartk || $compiler == dartkp) ]
assign_static_type_test/02: MissingCompileTimeError
@@ -625,3 +627,4 @@ regress_22728_test: Fail # Dartk Issue 28498
malbounded_type_cast_test: Crash
external_test/13: Crash
final_syntax_test/09: Crash
regress_29025_test: Crash
@@ -956,3 +956,6 @@ vm/regress_28325_test:Skip
[$compiler == precompiler && $runtime == dart_precompiled ]
stacktrace_demangle_ctors_test: RuntimeError
[ $compiler == precompiler && $runtime == dart_precompiled && $mode == debug ]
regress_29025_test: Crash # Issue dartbug.com/29331
+3
View File
@@ -474,6 +474,9 @@ regress_23089_test: MissingCompileTimeError
regress_23408_test: RuntimeError
regress_27572_test: MissingCompileTimeError
regress_26133_test: MissingCompileTimeError
regress_28341_test: Fail # Issue 28340
return_type_test: MissingCompileTimeError
rewrite_implicit_this_test/01: MissingCompileTimeError
setter_override2_test/none: CompileTimeError
setter4_test: MissingCompileTimeError # Issue 14736
static_field1_test/01: MissingCompileTimeError
+25
View File
@@ -0,0 +1,25 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--load-deferred-eagerly
// VMOptions=
import "package:expect/expect.dart";
import "regress_28278_lib.dart" deferred as def;
var result = "";
class D {
m() async {
await def.loadLibrary();
result = def.foo(result += "Here");
}
}
main() async {
var d = new D();
await d.m();
await d.m();
Expect.equals("HereHelloHereHello", result);
}
+12
View File
@@ -0,0 +1,12 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
enum E { A }
main() {
Expect.isTrue(E.values == const <E>[E.A]);
Expect.isTrue(E.values == const [E.A]);
}
+14
View File
@@ -0,0 +1,14 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
class A {
final int Function = 0;
}
main() {
final int Function = 0;
Expect.equals(Function, new A().Function);
}
+30
View File
@@ -0,0 +1,30 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
typedef T F<T>(T t);
class B<T extends F<T>> {}
class C<T extends F<C<T>>> {}
class D extends B<D> {
D foo(D x) => x;
D call(D x) => x;
D bar(D x) => x;
}
class E extends C<E> {
C<E> foo(C<E> x) => x;
C<E> call(C<E> x) => x;
C<E> bar(C<E> x) => x;
}
main() {
F<D> fd = new D();
var d = fd(fd);
print(d);
F<E> fe = new E();
var e = fe(fe);
print(e);
}
+12
View File
@@ -0,0 +1,12 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
int Function() x = () => 42;
int Function(int Function()) y = (int Function() x) => x();
List<int Function()> l = <int Function()>[()=>42, x];
main() {
Expect.equals(42, y(l[1]));
}
+13
View File
@@ -0,0 +1,13 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// VMOptions=--generic-method-syntax
List<T> get<T>(T item) => <T>[item];
List<T> get2<T>(T item) => <T>[item];
void main() {
print(get(1));
print(get2(1));
}
+18
View File
@@ -0,0 +1,18 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
abstract class A<T extends A<T>> {}
abstract class B<T extends A<T>> {}
class C<U> extends B<D<U>> {}
class D<U> extends A<D<U>> {}
main() {
new D();
new C();
new D<C>();
new C<D>();
}
+12
View File
@@ -0,0 +1,12 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class Foo {
void call(void callback(Foo foo)) {}
}
main() {
Foo foo = new Foo();
foo(foo);
}
+15
View File
@@ -0,0 +1,15 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
abstract class S {}
abstract class M<T> {}
abstract class N<T> {}
class C<T> extends S with M<C<T>>, N<C<T>> {}
main() {
new C<int>();
}
+13
View File
@@ -0,0 +1,13 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class BigInt {}
main() {
void foo(void Function(BigInt, BigInt) f) {
f(new BigInt(), new BigInt());
}
foo((x, y) {});
}
+18
View File
@@ -0,0 +1,18 @@
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
class Mock {
noSuchMethod(i) {}
}
class Foo {
int call() => 1;
}
class MockFoo extends Mock implements Foo {}
main() {
var foo = new MockFoo();
foo();
}
@@ -29,5 +29,5 @@ main() {
testComparable(Comparable<Object> c) {
Expect.equals(c.compareTo(42), 1, '$c');
Expect.equals(c.compareTo(41), -1, '$c');
Expect.throwsTypeError(() => c.compareTo('42'));
Expect.throws(() => c.compareTo('42'));
}
+15
View File
@@ -0,0 +1,15 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
int returnString1() => 's'; /*@compile-error=unspecified*/
void returnNull() => null;
void returnString2() => 's'; /*@compile-error=unspecified*/
main() {
returnString1();
returnNull();
returnString2();
}
@@ -10,7 +10,7 @@ class Foo {
String x = 'x';
easy(z) {
return x + y + z; //# 01: static type warning
return x + y + z; //# 01: compile-time error
}
// Shadow the 'y' field in various ways
+7 -2
View File
@@ -169,6 +169,13 @@ regress_21912_test: Skip
regress_22438_test: Skip
return_type_test: Skip
rewrite_implicit_this_test: Skip
setter4_test: Skip
setter_declaration2_negative_test: Skip
setter_declaration_negative_test: Skip
setter_no_getter_call_test: Skip
setter_override2_test: Skip
setter_override_test: Skip
source_self_negative_test: Skip
super_operator_index6_test: Skip
super_operator_index7_test: Skip
super_operator_index8_test: Skip
@@ -215,11 +222,9 @@ field3a_negative_test: StaticWarning # Issue 28823
interface_inherit_field_test: StaticWarning # Issue 28823
internal_library_test/02: MissingStaticWarning # Issue 28823
no_main_test/01: MissingStaticWarning # Issue 28823
reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823
super_setter_test: StaticWarning # Issue 28823
[ $compiler == dartdevc ]
reify_typevar_static_test/00: MissingCompileTimeError # Issue 29920
[ $compiler == dartdevc && $runtime != none ]
async_star_cancel_while_paused_test: RuntimeError # Issue 29920
@@ -32,4 +32,5 @@ redirecting_factory_reflection_test: RuntimeError
regress_r24720_test: RuntimeError
reify_typevar_static_test/00: MissingCompileTimeError
reify_typevar_test: RuntimeError
setter_no_getter_test/01: Crash # VM does not support BottomType
sync_generator3_test/test2: RuntimeError
@@ -1,31 +0,0 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
isCheckedMode() {
try {
var i = 1;
String s = i;
return false;
} catch (e) {
return true;
}
}
int returnString1() => 's';
void returnNull() => null;
void returnString2() => 's';
main() {
if (isCheckedMode()) {
Expect.throws(returnString1, (e) => e is TypeError);
Expect.throws(returnString2, (e) => e is TypeError);
returnNull();
} else {
returnString1();
returnNull();
returnString2();
}
}