From 80add289c43fa1d71e09779cf2188f228c2f1378 Mon Sep 17 00:00:00 2001 From: moonz Date: Fri, 30 Jan 2026 18:01:09 +0100 Subject: fix: code action is no longer available inside the block of if statement --- tests/action_invert_if_test.odin | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/action_invert_if_test.odin b/tests/action_invert_if_test.odin index 0639b69..bb12ad9 100644 --- a/tests/action_invert_if_test.odin +++ b/tests/action_invert_if_test.odin @@ -148,6 +148,24 @@ main :: proc() { test.expect_action(t, &source, {}) } + +@(test) +action_invert_if_inside_of_statement :: proc(t: ^testing.T) { + source := test.Source { + main = `package test + +main :: proc() { + if x != 0 { + foo{*}() + } +} +`, + packages = {}, + } + + test.expect_action(t, &source, {}) +} + @(test) action_invert_if_not_eq :: proc(t: ^testing.T) { source := test.Source { -- cgit v1.2.3