Check if method is declared by interface in VisibilityTransformer #108

Closed
Desetude wants to merge 1 commits from Desetude:hfreeb/vt-interface into master
There is no content yet.
gpe requested changes 4 years ago
gpe left a comment
Owner

Good spot!

Given interface members are always public, I think we could return Opcodes.ACC_PUBLIC immediately after the val declaredByInterface = ... line (if it is true, of course).

This would simplify the when block below, which is already quite complicated.

I think we could also remove this special case at the top?

            // interface members are always public
            return Opcodes.ACC_PUBLIC
        }```
        
as I think it should be covered by your new logic.
Good spot! Given interface members are always public, I think we could `return Opcodes.ACC_PUBLIC` immediately after the `val declaredByInterface = ...` line (if it is `true`, of course). This would simplify the `when` block below, which is already quite complicated. I think we could also remove this special case at the top? ``` if (classAccess and Opcodes.ACC_INTERFACE != 0) { // interface members are always public return Opcodes.ACC_PUBLIC }``` as I think it should be covered by your new logic.
Poster

Made the requested changes.

Made the requested changes.
Owner

thanks!

thanks!
Owner

cherry-picked

cherry-picked
gpe closed this pull request 4 years ago
Desetude deleted branch hfreeb/vt-interface 4 years ago
All checks were successful
continuous-integration/drone/pr Build is passing
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
Loading…
There is no content yet.