Account for exact references in indirect call effects#8807
Account for exact references in indirect call effects#8807stevenfontanella wants to merge 2 commits into
Conversation
tlively
left a comment
There was a problem hiding this comment.
Something I realized we're probably not handling correctly (but tell me if I'm wrong) is inexact function imports. When I import a function inexactly with type $super, take a reference to it somewhere, and then somewhere else do an indirect call to $sub, it's possible that I end up calling the import. That's because the reference to the imported function reference can be cast to $sub, and that cast might succeed depending on the function that was supplied at instantiation time.
But this is probably a pre-existing bug. I only thought about it because I was considering exactness. It probably makes sense to fix separately.
I see, even in closed-world mode the import is basically acting as an alias and can redefine the function as a supertype of its real type. Would something like #8811 be enough to fix it? This PR makes a similar mistake here, so maybe I'd try to fix this more generally before submitting this PR. |
Part of #8615. Allows us to ignore effects from func subtypes when we have an indirect call to an exact reference.