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

Unified Diff: tests/language/static_setter_get_test.dart

Issue 1154743004: Test (and fix some) invalid assignments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
Index: tests/language/static_setter_get_test.dart
diff --git a/tests/compiler/dart2js_extra/22917_test.dart b/tests/language/static_setter_get_test.dart
similarity index 62%
copy from tests/compiler/dart2js_extra/22917_test.dart
copy to tests/language/static_setter_get_test.dart
index e4f46da549655e11e6dff57181ea9d018864a4d4..a10c1d9205982a1e479f51c3c9b0cc7ec8ed4533 100644
--- a/tests/compiler/dart2js_extra/22917_test.dart
+++ b/tests/language/static_setter_get_test.dart
@@ -2,14 +2,14 @@
// 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/22917
-
import 'package:expect/expect.dart';
-m(x) => print('x: $x');
-
-test() => Function.apply(m, []);
+class Class {
+ static set o(_) {}
+ m() => o; /// 01: static type warning
+ noSuchMethod(_) => 42;
+}
main() {
- Expect.throws(test);
-}
+ Expect.throws(() => new Class().m()); /// 01: continued
+}
« tests/language/language_dart2js.status ('K') | « tests/language/language_dart2js.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698