Skip to content

Query ignoring predicates #105

@andreluisos

Description

@andreluisos

Describe the bug
Apparently, query predicates are being completely ignored. On the query/code bellow, I'm getting 6 matches, instead of one.

Expected behavior
Only one match should be expected:
Image

OS and Java version

  • OS: Linux 64bit
  • Java version: 24

Sample code:

[
  (marker_annotation
    name: (identifier) @name
    (#eq? @name "Entity"))
  (annotation
    name: (identifier) @name
    (#eq? @name "Entity"))
  (marker_annotation
    name: (scoped_identifier
      name: (identifier) @name)
    (#eq? @name "Entity"))
] @annotation

Source code:

package org.example;


@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "test")
public class Test {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions