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

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

Issue 22846003: Fix for function type assignable check. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
index ec4a774b16269d131f13ec44ab01b8d4de890ec7..bc82276aa77f4bffefbba63c0bc98ffd28e0cffe 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/StaticWarningCodeTest.java
@@ -429,6 +429,18 @@ public class StaticWarningCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_argumentTypeNotAssignable_invocation_functionTypes_optional() throws Exception {
+ Source source = addSource(createSource(//
+ "void acceptFunNumOptBool(void funNumOptBool([bool b])) {}",
+ "void funNumBool(bool b) {}",
+ "main() {",
+ " acceptFunNumOptBool(funNumBool);",
+ "}"));
+ resolve(source);
+ assertErrors(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
+ verify(source);
+ }
+
public void test_argumentTypeNotAssignable_invocation_generic() throws Exception {
Source source = addSource(createSource(//
"class A<T> {",

Powered by Google App Engine
This is Rietveld 408576698