update issue21159_test for Dart 2, fixes #30701

Change-Id: I170a253621f54ea89f79bd50003e22295377f4c4
Reviewed-on: https://dart-review.googlesource.com/52864
Reviewed-by: Leaf Petersen <leafp@google.com>
diff --git a/tests/language_2/call_method_must_not_be_getter_test.dart b/tests/language_2/call_method_must_not_be_getter_test.dart
index d21132b..ac070dd 100644
--- a/tests/language_2/call_method_must_not_be_getter_test.dart
+++ b/tests/language_2/call_method_must_not_be_getter_test.dart
@@ -9,6 +9,16 @@
   void Function() get call => () {};
 }
 
+class D {
+  get call => this;
+}
+
+// Recurs outside the try-block to avoid disabling inlining.
+callD() {
+  dynamic d = new D();
+  d();
+}
+
 main() {
   C c = new C();
   dynamic d = c;
@@ -20,6 +30,9 @@
   void Function() f = c; //# 02: compile-time error
   // Nor does it permit a dynamic invocation of `call`.
   Expect.throws(() => d()); //# 03: ok
+  // Same as previous line, but with a getter that can stack overflow if
+  // incorrect behavior is present. Merged from issue21159_test.
+  Expect.throwsNoSuchMethodError(() => callD()); //# 03: ok
 
   // However, all these things are possible if `call` is mentioned explicitly.
   c.call(); //# 04: ok
diff --git a/tests/language_2/issue21159_test.dart b/tests/language_2/issue21159_test.dart
deleted file mode 100644
index 62227c6..0000000
--- a/tests/language_2/issue21159_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2014, 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 C {
-  get call => this;
-}
-
-// Recurs outside the try-block to avoid disabling inlining.
-foo() {
-  dynamic c = new C();
-  c();
-}
-
-main() {
-  bool exceptionCaught = false;
-  try {
-    foo();
-  } on StackOverflowError catch (e) {
-    exceptionCaught = true;
-  }
-  Expect.equals(true, exceptionCaught);
-}
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index e4180aa..84e6d30 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -315,7 +315,6 @@
 deferred_static_seperate_test: Crash # Requires deferred libraries
 deferred_super_dependency_test: Pass, Crash # Requires deferred libraries
 deferred_type_dependency_test: Crash # Requires deferred libraries
-issue21159_test: Pass, Crash # Issue 29094
 issue_1751477_test: Crash # Requires deferred libraries
 issue_22780_test/01: Pass, Crash # Issue 29094
 regress_22443_test: Crash # Requires deferred libraries
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index ed5dedb..aa093ca 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -706,7 +706,6 @@
 invocation_mirror_invoke_on2_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
 invocation_mirror_invoke_on_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
 invocation_mirror_test: RuntimeError # Type 'NativeJavaScriptObject' is not a subtype of type 'int' in strong mode
-issue21159_test: RuntimeError # Issue 30701; TypeError: method.bind is not a function
 issue23244_test: RuntimeError # Issue 29920; Uncaught Unsupported operation: only top-level functions can be spawned.
 least_upper_bound_expansive_test/none: RuntimeError # 30908; Uncaught RangeError: Maximum call stack size exceeded
 left_shift_test: RuntimeError # Ints and doubles are unified.; Expect.equals(expected: <1>, actual: <-4294967295>) fails.