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

Unified Diff: tests/compiler/dart2js_extra/23056_test.dart

Issue 1057513002: Also intialize methods inherited from mixin classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added a regression test. Created 5 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
Index: tests/compiler/dart2js_extra/23056_test.dart
diff --git a/tests/compiler/dart2js_extra/23056_test.dart b/tests/compiler/dart2js_extra/23056_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c8953f204e6ba08a56866501ebb13c6d8664a8ca
--- /dev/null
+++ b/tests/compiler/dart2js_extra/23056_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2015, 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.
+
+// Regression test for http://dartbug.com/23056/
+// Ensure that Mixin prototypes are initialized before first use.
+
+// Mirrors is the only way to have a getter be equipped with metadata.
+@MirrorsUsed(targets: 'M', override: '*')
+import 'dart:mirrors';
+
+import 'package:expect/expect.dart';
+
+class M {
+ @NoInline()
+ bool get foo => true;
+}
+
+class A extends Object with M {
+ @NoInline()
+ bool get foo => super.foo;
+}
+
+@AssumeDynamic() @NoInline()
+bool hide(bool x) => x;
+
+main() {
+ Expect.isTrue((hide(true) ? new A() : new M()).foo);
+}

Powered by Google App Engine
This is Rietveld 408576698