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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1241953008: Fix assertion in FunctionVisitor to account for unresolved types. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 4cee7e86fe666c40a492fbf8786145044225e996..b701c0e28a4deab358e5b16cedf0e4fb55997ca3 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -92,6 +92,7 @@ class FunctionVisitor : public ObjectVisitor {
// TypeParameter.
typeHandle_ ^= funcHandle_.result_type();
ASSERT(typeHandle_.IsNull() ||
+ !typeHandle_.IsResolved() ||
typeHandle_.IsTypeParameter() ||
typeHandle_.IsCanonical());
// Verify that the types in the function signature are all canonical or
@@ -99,7 +100,9 @@ class FunctionVisitor : public ObjectVisitor {
const intptr_t num_parameters = funcHandle_.NumParameters();
for (intptr_t i = 0; i < num_parameters; i++) {
typeHandle_ = funcHandle_.ParameterTypeAt(i);
- ASSERT(typeHandle_.IsTypeParameter() || typeHandle_.IsCanonical());
+ ASSERT(typeHandle_.IsTypeParameter() ||
+ !typeHandle_.IsResolved() ||
+ typeHandle_.IsCanonical());
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698