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

Unified Diff: test/codegen/language/static_field_override2_test.dart

Issue 1927353002: Use lazy static fields when overriding static getters or setters. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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: test/codegen/language/static_field_override2_test.dart
diff --git a/test/codegen/language/hashcode_dynamic_test.dart b/test/codegen/language/static_field_override2_test.dart
similarity index 56%
copy from test/codegen/language/hashcode_dynamic_test.dart
copy to test/codegen/language/static_field_override2_test.dart
index b705dd8afaaf98e39def9dde62120f5eff404962..7942c35d74f9d3922e1139fbc3f3d25692c8299d 100644
--- a/test/codegen/language/hashcode_dynamic_test.dart
+++ b/test/codegen/language/static_field_override2_test.dart
@@ -2,9 +2,17 @@
// 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.
-import "package:expect/expect.dart";
+import 'package:expect/expect.dart';
-void main() {
- dynamic x = 3;
- Expect.equals(3, x.hashCode);
+class Foo {
+ static int get x => 42;
+ static void set x(value) {}
+}
+
+class Bar extends Foo {
+ static int x = 12;
}
+
+void main() {
+ Expect.equals(12, Bar.x);
+}
« no previous file with comments | « test/codegen/language/static_field_override1_test.dart ('k') | test/codegen/language/static_field_override3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698