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

Unified Diff: tests/language/final_super_field_set_test.dart

Issue 1154743004: Test (and fix some) invalid assignments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 7 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 | « tests/compiler/dart2js/semantic_visitor_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/final_super_field_set_test.dart
diff --git a/tests/language/regress_21998_1_test.dart b/tests/language/final_super_field_set_test.dart
similarity index 60%
copy from tests/language/regress_21998_1_test.dart
copy to tests/language/final_super_field_set_test.dart
index 3237f3396629f6fd11270e1adc290bec78713958..9c3289bb1f94059cdc49e5330bfad14bb4f58d3f 100644
--- a/tests/language/regress_21998_1_test.dart
+++ b/tests/language/final_super_field_set_test.dart
@@ -2,17 +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.
-import 'dart:math' as Math;
import 'package:expect/expect.dart';
-main() {
- Expect.equals(4, new C().m());
+class SuperClass {
+ final field = 0;
+ noSuchMethod(_) => 42;
}
-class C {
- max(a) => a;
-
+class Class extends SuperClass {
m() {
- return max(Math.max(2, 4));
+ super.field = 87; /// 01: static type warning
}
+}
+
+main() {
+ new Class().m(); /// 01: continued
}
« no previous file with comments | « tests/compiler/dart2js/semantic_visitor_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698