Skip to content
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

invokespecial.go中Execute为什么不用考虑resolvedMethod是private的情况 #39

Open
xumingxsh opened this issue Jun 10, 2020 · 2 comments

Comments

@xumingxsh
Copy link

zxh0,你好!请教一下,
1) invokespecial.go中Execute为什么不用考虑resolvedMethod是private的情况?
2) if resolvedMethod.IsProtected() && 这句话中,是不是将后面的判断语句用一个新的if语句会更有利于阅读
https://github.com/zxh0/jvmgo-book/blob/master/v1/code/go/src/jvmgo/ch07/instructions/references/invokespecial.go

@xumingxsh
Copy link
Author

是不是因为private的情况在编译器已经被过滤掉了

@xumingxsh
Copy link
Author

不是看你的书,还真没意识到 protected是包内可见的,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant