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

Unified Diff: tests/language/syntax_test.dart

Issue 2248943002: Class fields cannot be declared to be of type void (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/syntax_test.dart
diff --git a/tests/language/syntax_test.dart b/tests/language/syntax_test.dart
index 11aee706152c03268fc28a894eafbc29817eb23f..7f7b21bda1008a20c0e71dc69a126d88bd074db9 100644
--- a/tests/language/syntax_test.dart
+++ b/tests/language/syntax_test.dart
@@ -238,6 +238,7 @@ main() {
new SyntaxTest() = 1; /// 64: compile-time error
futureOf(null) = 1; /// 65: compile-time error
+ new C();
} catch (ex) {
// Swallowing exceptions. Any error should be a compile-time error
// which kills the current isolate.
@@ -247,3 +248,9 @@ main() {
class Bad {
factory Bad<Bad(String type) { return null; } /// 63: compile-time error
}
+
+class C {
+ void f; /// 66: compile-time error
+ static void g; /// 67: compile-time error
+}
+
« runtime/vm/parser.cc ('K') | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698