-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix call_ref on empty stack #2472
Conversation
PrintError("%s", message.c_str()); | ||
result = Result::Error; | ||
Result result = PeekType(0, &type); | ||
if (!type.IsReferenceWithIndex()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK to use type
here even if PeekType fails? i.e. should we return early if PeekType fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is fine. PeekType will set type
to Type::Any
, this is the same logic as the fix in #2471 - we want the error message.
(you'll have to rebase it) |
(actually we'll rebase it) |
Head branch was pushed to by a user without write access
d45640e
to
b9c687f
Compare
(you'll have to re-enable auto-merge tho) |
Same issue as #2471 but for
call_ref
.We don't believe there's a prior issue for this.