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

Unified Diff: tests/language/const_constructor_super2_test.dart

Issue 2072223002: Enforce use of the forEachInstanceField ordering for constructed constants. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove tab Created 4 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/compiler/lib/src/js_backend/namer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/const_constructor_super2_test.dart
diff --git a/tests/language/super_no_such_method3_test.dart b/tests/language/const_constructor_super2_test.dart
similarity index 52%
copy from tests/language/super_no_such_method3_test.dart
copy to tests/language/const_constructor_super2_test.dart
index 864fa787c95f822b89d4059dcedd8d1b5692c6ee..8832d2417ab5e811ad2f86bf45c31f416e2a5959 100644
--- a/tests/language/super_no_such_method3_test.dart
+++ b/tests/language/const_constructor_super2_test.dart
@@ -4,23 +4,26 @@
import 'package:expect/expect.dart';
-var result;
-
class A {
- noSuchMethod(im) {
- result = 42;
- }
+ final a;
+
+ const A(this.a);
}
class B extends A {
- noSuchMethod(im) {
- result = 87;
- }
+ final b;
- set foo(v) => super.foo = v; /// 01: static type warning
+ const B(a, this.b) : super(a);
}
-main() {
- new B().foo = 0; /// 01: continued
- Expect.equals(42, result); /// 01: continued
+@NoInline()
+foo() => const B(1, 2);
+
+@NoInline()
+bar() => const B(2, 2);
+
+void main() {
+ Expect.notEquals(foo(), bar());
+ Expect.notEquals(foo().a, bar().a);
+ Expect.equals(foo().b, bar().b);
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698