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

在 @Inject 中使用内部变量的问题 #114

Open
FloydP opened this issue Apr 16, 2021 · 3 comments
Open

在 @Inject 中使用内部变量的问题 #114

FloydP opened this issue Apr 16, 2021 · 3 comments

Comments

@FloydP
Copy link

FloydP commented Apr 16, 2021

我在example 的 @ Inject 示例中,尝试使用内部变量,但是发现并不生效,请问我应该如何正确的使用?
下面是代码和打印
flutter 版本 1.22.6
aspectd 版本 tag 1.0.5

aop_impl.dart
image

main.dart
image

输出
image

app.dill
image

发现在dill 文件里 int a 并没有被忽略,所以应该怎么让 内部变量被忽略呢

@kangwang1988

@FloydP FloydP changed the title @Inject 的 使用内部变量的问题 @Inject 中使用内部变量的问题 Apr 16, 2021
@FloydP FloydP changed the title @Inject 中使用内部变量的问题 在 @Inject 中使用内部变量的问题 Apr 16, 2021
@kangwang1988
Copy link
Contributor

kangwang1988 commented Apr 17, 2021

这两个还是不一样的。
一个是参数列表中的a, 一个是局部变量a。
可以通过DEBUG.md调试看看
@FloydP

@FloydP
Copy link
Author

FloydP commented Apr 17, 2021

这两个还是不一样的。
一个是参数列表中的a,一个是局部变量a。
可以通过DEBUG.md调试看看
@FloydP

这样~ 谢谢回复, 那请问如果我要在 @ Inject 中 使用 C(int a) 中的a ,我应该怎么写呢?
还有 //Aspectd Ignore 这个注释 怎样才能让 对应的变量被 忽略?
@kangwang1988

@lwy980328
Copy link

我也遇见了一样的问题 请问您有进展吗 @FloydP

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

3 participants