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

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

Issue 66253002: Version 0.8.10.9 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
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
Index: dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java (revision 30098)
+++ dart/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java (working copy)
@@ -449,6 +449,15 @@
verify(source);
}
+ public void test_constEval_functionTypeLiteral() throws Exception {
+ Source source = addSource(createSource(//
+ "typedef F();",
+ "const C = F;"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
public void test_constEval_propertyExtraction_fieldStatic_targetType() throws Exception {
addSource("/math.dart", createSource(//
"library math;",
@@ -2004,6 +2013,32 @@
verify(source);
}
+ public void test_mixedReturnTypes_ignoreImplicit() throws Exception {
+ Source source = addSource(createSource(//
+ "f(bool p) {",
+ " if (p) return 42;",
+ " // implicit 'return;' is ignored",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
+ public void test_mixedReturnTypes_ignoreImplicit2() throws Exception {
+ Source source = addSource(createSource(//
+ "f(bool p) {",
+ " if (p) {",
+ " return 42;",
+ " } else {",
+ " return 42;",
+ " }",
+ " // implicit 'return;' is ignored",
+ "}"));
+ resolve(source);
+ assertNoErrors(source);
+ verify(source);
+ }
+
public void test_mixedReturnTypes_sameKind() throws Exception {
Source source = addSource(createSource(//
"class C {",

Powered by Google App Engine
This is Rietveld 408576698