-
Notifications
You must be signed in to change notification settings - Fork 122
部分语句Inject会失效 #34
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
Comments
@lizhangqu |
This was referenced Nov 18, 2020
Closed
This was referenced Mar 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
比如if当前行,forin当前行和循环体内代码,for当前行和循环体内代码都无法Inject代码,见下面的case
if (a > 5)
这一行前面即int a = 10;
这一行后面无法用Inject注入代码for (Observer o in observers) {
这一行前面即print('[KWLM]:a');
这一行后面无法用Inject注入代码循环体内无法用Inject注入代码
for (int i = 0; i < 10; i++) {
这一行前面即print('[KWLM]:b');
这一行后面无法用Inject注入代码循环体内无法用Inject注入代码
可能和这个函数没有处理for循环有关:
可以在Inject注解上增加后向插入
后向插入取statement2InsertPos+1
这样就能在if语句和for循环语句前面一行插入,即插入上一行的后面。
The text was updated successfully, but these errors were encountered: