Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 979f1b88f146478df4c0a95c901c6df12bcb12e6..212f270b6d4f5b5ae6e771a5f7b4b2035352718e 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -124,6 +124,11 @@ class CheckFunctionTypesVisitor : public ObjectVisitor { |
if (obj->IsFunction()) { |
funcHandle_ ^= obj; |
classHandle_ ^= funcHandle_.Owner(); |
+ // Signature functions get created, but not canonicalized, when function |
+ // types get instantiated during run time type tests. |
+ if (funcHandle_.IsSignatureFunction()) { |
+ return; |
+ } |
// Verify that the result type of a function is canonical or a |
// TypeParameter. |
typeHandle_ ^= funcHandle_.result_type(); |