Skip to content

Commit 58f41fd

Browse files
author
Jenny Messerly
committed
update issue21159_test for Dart 2, fixes #30701
Change-Id: I170a253621f54ea89f79bd50003e22295377f4c4 Reviewed-on: https://dart-review.googlesource.com/52864 Reviewed-by: Leaf Petersen <[email protected]>
1 parent e6d7d67 commit 58f41fd

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

tests/language_2/call_method_must_not_be_getter_test.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ class C {
99
void Function() get call => () {};
1010
}
1111

12+
class D {
13+
get call => this;
14+
}
15+
16+
// Recurs outside the try-block to avoid disabling inlining.
17+
callD() {
18+
dynamic d = new D();
19+
d();
20+
}
21+
1222
main() {
1323
C c = new C();
1424
dynamic d = c;
@@ -20,6 +30,9 @@ main() {
2030
void Function() f = c; //# 02: compile-time error
2131
// Nor does it permit a dynamic invocation of `call`.
2232
Expect.throws(() => d()); //# 03: ok
33+
// Same as previous line, but with a getter that can stack overflow if
34+
// incorrect behavior is present. Merged from issue21159_test.
35+
Expect.throwsNoSuchMethodError(() => callD()); //# 03: ok
2336

2437
// However, all these things are possible if `call` is mentioned explicitly.
2538
c.call(); //# 04: ok

tests/language_2/issue21159_test.dart

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/language_2/language_2.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ deferred_shared_and_unshared_classes_test: Crash # Requires deferred libraries
315315
deferred_static_seperate_test: Crash # Requires deferred libraries
316316
deferred_super_dependency_test: Pass, Crash # Requires deferred libraries
317317
deferred_type_dependency_test: Crash # Requires deferred libraries
318-
issue21159_test: Pass, Crash # Issue 29094
319318
issue_1751477_test: Crash # Requires deferred libraries
320319
issue_22780_test/01: Pass, Crash # Issue 29094
321320
regress_22443_test: Crash # Requires deferred libraries

tests/language_2/language_2_dartdevc.status

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ invocation_mirror2_test: RuntimeError # UnimplementedError: JsInstanceMirror.del
706706
invocation_mirror_invoke_on2_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
707707
invocation_mirror_invoke_on_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
708708
invocation_mirror_test: RuntimeError # Type 'NativeJavaScriptObject' is not a subtype of type 'int' in strong mode
709-
issue21159_test: RuntimeError # Issue 30701; TypeError: method.bind is not a function
710709
issue23244_test: RuntimeError # Issue 29920; Uncaught Unsupported operation: only top-level functions can be spawned.
711710
least_upper_bound_expansive_test/none: RuntimeError # 30908; Uncaught RangeError: Maximum call stack size exceeded
712711
left_shift_test: RuntimeError # Ints and doubles are unified.; Expect.equals(expected: <1>, actual: <-4294967295>) fails.

0 commit comments

Comments
 (0)