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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java

Issue 47513022: Issue 14363. Support for type promotion when '(v) is T'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 6c3cc620b3db5cd58fe6128edaefb6c000e8a785..d21e64fcbb6bdd80acf15f36b6469a6c7a50850a 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -3324,6 +3324,19 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_typePromotion_parentheses() throws Exception {
+ Source source = addSource(createSource(//
+ "main(Object p) {",
+ " (p is String) ? p.length : 0;",
+ " (p) is String ? p.length : 0;",
+ " ((p)) is String ? p.length : 0;",
+ " ((p) is String) ? p.length : 0;",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
public void test_typeType_class() throws Exception {
Source source = addSource(createSource(//
"class C {}",
« no previous file with comments | « editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698