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

Unified Diff: pkg/dev_compiler/test/codegen/language/implicit_super_constructor_test.dart

Issue 2365053003: fix #27421, DDC did not generate implicit super calls in some cases (Closed)
Patch Set: Created 4 years, 3 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: pkg/dev_compiler/test/codegen/language/implicit_super_constructor_test.dart
diff --git a/tests/language/conflicting_type_variable_and_setter_test.dart b/pkg/dev_compiler/test/codegen/language/implicit_super_constructor_test.dart
similarity index 57%
copy from tests/language/conflicting_type_variable_and_setter_test.dart
copy to pkg/dev_compiler/test/codegen/language/implicit_super_constructor_test.dart
index 2aca0c32b659b1f1f213c4744ab50c6753befbbc..2c31206a2333de074885bc19d799b1c8f45f2035 100644
--- a/tests/language/conflicting_type_variable_and_setter_test.dart
+++ b/pkg/dev_compiler/test/codegen/language/implicit_super_constructor_test.dart
@@ -4,16 +4,17 @@
import "package:expect/expect.dart";
-class C<D> {
- void set D(int value) {
- field = value;
- }
+abstract class A {
+ int _x = 42;
+}
+
+abstract class B extends A {}
- int field;
+class C extends B {
+ C() {}
}
main() {
- C<int> c = new C<int>();
- c.D = 1;
- Expect.equals(c.field, 1);
+ // Regression test for https://github.com/dart-lang/sdk/issues/27421
+ Expect.equals(new C()._x, 42);
}
« 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