kamiiiel / asm-intellij-plugin

A plugin for Intellij IDEA that enables the user to see the Byte-code as well as the ASM code.
55 stars 13 forks source link

can't open inner classes's bytecode #9

Open wagyourtail opened 1 year ago

wagyourtail commented 1 year ago

when I try to open bytecode for an inner class, it always opens the outer class instead

kamiiiel commented 1 year ago

Hi, can you please add a small example code in here

wagyourtail commented 1 year ago
class example {
    class cantAccess1() {}
    public void exampleFun() {
        var anonymous = new Object() {
            public void cantAccess2() {}
        }
    }
}

https://github.com/Nasller/asm-intellij-plugin/pull/1

I did miss

public class MainClass {}

class cantAccess {
   public void yesThisIsLegal() {}
}

where package private in same file is also not visible

kamiiiel commented 1 year ago

You code has multiple issues and can't be compiled:

class example {
    class cantAccess1() {} // class can't be defined like this
    public void exampleFun() {
        public Object() {
            public void cantAccess2() {} // You can't define a method inside another method
        }
    }
}
wagyourtail commented 1 year ago

fixed