Index: dart/tests/language/crash_12118_test.dart |
diff --git a/dart/samples/tests/samples/browser/hi_test.dart b/dart/tests/language/crash_12118_test.dart |
similarity index 54% |
copy from dart/samples/tests/samples/browser/hi_test.dart |
copy to dart/tests/language/crash_12118_test.dart |
index 111797989253b6d72139ba36035872e9c3e54338..fea6996b338a21202bfd9d7197d1ea354b44a12b 100644 |
--- a/dart/samples/tests/samples/browser/hi_test.dart |
+++ b/dart/tests/language/crash_12118_test.dart |
@@ -2,16 +2,19 @@ |
// 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. |
-library hi_test; |
+// Regression test for issue 12118 which caused a crash in dart2js. |
-import '../../../hi/hi.dart' as hi; |
+const X = 42; |
-// @static-clean |
+class A { |
+ final x; |
+ A({this.x: X}); |
+} |
+ |
+class B extends A {} |
-/** |
- * This test exists to ensure that the hi sample compiles without errors. |
- */ |
void main() { |
- |
+ if (new B().x != 42) { |
+ throw 'Test failed'; |
+ } |
} |
- |