[decompiler] Better support for non-virtual methods #543
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously the decompiler didn't care if a method call was virtual or not. Now it checks to see if it is what it expects, and gives an error. By default, any
basic
expects virtual methods. If you find a basic type that doesn't use virtual methods (I thinkres-lump
will be one of these), you can add the:final
option in thedeftype
to tell the compiler/decompiler to use non-virtual method calls.The decompiler will now recognizes non-virtual method calls, but only if the types match up. If they don't, it leaves it as
method-of-type
.Example:
is now
but only when the decompiler know the type of
obj
is exactlyconnection
.This also recognizes
(new 'stack 'blah ...)
. Previously they were not recognized in the case where the constructor was actually called.Example:
is now