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

Unified Diff: tests/language_strong/super_from_constructor_test.dart

Issue 2944003003: Fixes for super tearoff in constructor (Closed)
Patch Set: Format Created 3 years, 6 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 | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language_strong/super_from_constructor_test.dart
diff --git a/tests/language_strong/super_from_constructor_test.dart b/tests/language_strong/super_from_constructor_test.dart
index f19bf116fc042cbe7a54c6d232a2dcbe6effdd52..352066a76f9fcbca8b01d72b4091e24a81111e67 100644
--- a/tests/language_strong/super_from_constructor_test.dart
+++ b/tests/language_strong/super_from_constructor_test.dart
@@ -6,9 +6,17 @@ import "package:expect/expect.dart";
final results = [];
+int invoke(int f()) => f();
+
class Base {
var f;
+ var z;
+
m(x) => results.add(x);
+
+ int g() {
+ return 42;
+ }
}
class C extends Base {
@@ -17,6 +25,11 @@ class C extends Base {
C(this._iter) {
_iter.map((x) => super.m(x)).toList();
super.f = _iter;
+ z = invoke(super.g);
+ }
+
+ int g() {
+ return -1;
}
}
@@ -24,4 +37,5 @@ main() {
var c = new C([1, 2, 3]);
Expect.listEquals(results, [1, 2, 3]);
Expect.listEquals(c.f, [1, 2, 3]);
+ Expect.equals(42, c.z);
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698