Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions codeflash/languages/java/instrumentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ def _is_inside_lambda(node: Any) -> bool:
"""Check if a tree-sitter node is inside a lambda_expression."""
current = node.parent
while current is not None:
if current.type == "lambda_expression":
t = current.type
if t == "lambda_expression":
return True
if current.type == "method_declaration":
if t == "method_declaration":
return False
current = current.parent
return False
Expand Down
Loading