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

Unified Diff: tests/language/isnot_malformed_type_test.dart

Issue 10944041: Ensure that parser throws an error when parsing x is! T with malformed type T. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: make test positive Created 8 years, 3 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 | « 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/isnot_malformed_type_test.dart
diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/my.unprefixed.app.dart b/tests/language/isnot_malformed_type_test.dart
similarity index 55%
copy from compiler/javatests/com/google/dart/compiler/end2end/inc/my.unprefixed.app.dart
copy to tests/language/isnot_malformed_type_test.dart
index b34d3fe30eebb5a4c764663356023f44ce7ac021..d0dabc00e4fe2a5f02d81207062f61ddb50a741d 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/my.unprefixed.app.dart
+++ b/tests/language/isnot_malformed_type_test.dart
@@ -1,17 +1,12 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// 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.
+// Parser throws an error when parsing x is! T with malformed type T.
-import "some.prefixable.lib.dart";
-
-class Unprefix {
- static final int foo = 43;
-
- static getSource() {
- return foo;
- }
-
- static getImport() {
- return Prefix.foo;
- }
+f(obj) {
+ return (obj is !Baz); // 'Baz' is not loaded error.
}
+
+main () {
+ f(null); /// 01: runtime error
+}
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698