junichi11 commented on code in PR #5670:
URL: https://github.com/apache/netbeans/pull/5670#discussion_r1140740127
##########
php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java:
##########
@@ -595,23 +596,27 @@ public void visit(ClassInstanceCreation node) {
// to avoid recognizing $this as an instance of an anonymous
class
scan(node.ctorParams());
addToPath(node);
+ // GH-5551 keep original type info to scnan parent blocks
+ TypeInfo originalTypeInfo = typeInfo;
typeInfo = new ClassInstanceCreationTypeInfo(node);
scan(node.getAttributes());
scan(node.getSuperClass());
scan(node.getInterfaces());
- needToScan = new ArrayList<>();
+ needToScan.put(typeInfo, new ArrayList<>());
Block body = node.getBody();
if (body != null) {
body.accept(this);
// find all usages in the method bodies
- while (!needToScan.isEmpty()) {
- Block block = needToScan.remove(0);
+ while (!needToScan.get(typeInfo).isEmpty()) {
+ Block block = needToScan.get(typeInfo).remove(0);
Review Comment:
Fixed. Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists