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 {", |