Closed z2Z6 closed 1 year ago
Hi @z2Z6 ,
thank you for opening the issue. Could you please check if the PR #963 solves the problem by chance? We're currently working on improving the naming system (which is almost done) and afterwards we'll work on the symbol/call resolution since they are related to each other. So please stay tuned :)
Hi @z2Z6 ,
thank you for opening the issue. Could you please check if the PR #963 solves the problem by chance? We're currently working on improving the naming system (which is almost done) and afterwards we'll work on the symbol/call resolution since they are related to each other. So please stay tuned :)
Unfortunately, it doesn't seem to work on the main
branch now. I will open issues I encounter if they can be describled clearly, look forward to the next version.
Hi @z2Z6 , thank you for opening the issue. Could you please check if the PR #963 solves the problem by chance? We're currently working on improving the naming system (which is almost done) and afterwards we'll work on the symbol/call resolution since they are related to each other. So please stay tuned :)
Unfortunately, it doesn't seem to work on the
main
branch now. I will open issues I encounter if they can be describled clearly, look forward to the next version.
I can confirm that this is now definitely fixed in #1031
The problem is solved, thanks.
Looks like I can reproduce this even with #1031 under certain cirumstances. I will have another look and add a test to the #1031 PR.
Hi @oxisto,
There seem to be another problem, if Sample.java
is in the package path which is the same as Test.java
. In this case, there is no need to import package path of Test.java
for Sample.java
.
package structure
|--com
|--Test.java
|--Sample.java
Sample.java
package com;
public class Sample {
public void func() {
Test.doSomething(); // The attribute `isStatic` of MemberCallExpression is false
}
}
Hi @oxisto, There seem to be another problem, if
Sample.java
is in the package path which is the same asTest.java
. In this case, there is no need to import package path ofTest.java
forSample.java
.package structure
|--com |--Test.java |--Sample.java
Sample.java
package com; public class Sample { public void func() { Test.doSomething(); // The attribute `isStatic` of MemberCallExpression is false } }
Interesting. Seems this a different, but related issue. Could you maybe open a second issue for this specifically? I do not want to have too many problems in one single issue :)
The issue is opened in #1041.
Unexpected behavior
The node type of
test.doSomething
on line 6 is affected by package path on first line. If penultimate package name which ends with.*
is the same as base name ofmemberCallExpression
, then thememberCallExpression
will be mistakenly parsed asstaticCallExpression
, e.g. node on line 6. Modify package name "test" on first line to others, the node type is parsed asmemberCallExpression
correctly.Code of interest
package structure
Sample.java
Configuration
v5.1.0