Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1067)

Unified Diff: tests/language/type_variable_conflict2_test.dart

Issue 2781273003: Change test to match issue 19725. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/language_kernel.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/type_variable_conflict2_test.dart
diff --git a/tests/language/type_variable_conflict2_test.dart b/tests/language/type_variable_conflict2_test.dart
index b9a64d883c659b61e5b5c04dd4021cf68b25e2f2..b82accb0450847a1cb7389ca806e3dfe7ee2ae29 100644
--- a/tests/language/type_variable_conflict2_test.dart
+++ b/tests/language/type_variable_conflict2_test.dart
@@ -8,11 +8,10 @@ import "package:expect/expect.dart";
class C<T> {
noSuchMethod(Invocation im) {
- Expect.equals(#T, im.memberName);
- return 42;
+ throw "noSuchMethod shouldn't be called in this test.";
}
- // Class 'C' has no instance method 'T': call noSuchMethod.
+ // This is equivalent to (T).call(). See issue 19725
foo() => T(); // //# 01: static type warning
// T is in scope, even in static context. Compile-time error to call this.T().
@@ -44,7 +43,7 @@ class C<T> {
}
main() {
- Expect.equals(42, new C().foo()); // //# 01: continued
+ Expect.throws(() => new C().foo(), (e) => e is NoSuchMethodError); //# 01: continued
C.bar(); // //# 02: continued
Expect.throws(() => C.baz(), (e) => e is NoSuchMethodError); // //# 03: continued
Expect.throws(() => C.qux(), (e) => e is NoSuchMethodError); // //# 04: continued
« no previous file with comments | « tests/language/language_kernel.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698