Skip to content

Commit 443979a

Browse files
committed
Update tests for suggestions
1 parent 303b782 commit 443979a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

source/compiler/tests/gh_353_symbol_suggestions.meta

+2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ gh_353_symbol_suggestions.pwn(138) : error 087: unknown state "BEING1" for autom
2424
gh_353_symbol_suggestions.pwn(138) : error 036: empty statement
2525
gh_353_symbol_suggestions.pwn(141) : error 087: unknown state "STATE_1" for automaton "automaton_2"; did you mean "automaton_1:STATE_1"?
2626
gh_353_symbol_suggestions.pwn(141) : error 036: empty statement
27+
gh_353_symbol_suggestions.pwn(148) : error 017: undefined symbol "test_e017_sug2_var"; state variable out of scope
28+
gh_353_symbol_suggestions.pwn(153) : error 017: undefined symbol "test_e017_sug2_var"; state variable out of scope
2729
"""
2830
}

source/compiler/tests/gh_353_symbol_suggestions.pwn

+16
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,19 @@ public test_e087()
140140
// error 087: unknown state "STATE_1" for automaton "automaton_2"; did you mean "automaton_1:STATE_1"?
141141
state automaton_2:STATE_1;
142142
}
143+
144+
new test_e017_sug2_var <automaton_3:STATE_2>;
145+
forward test_e017_sug2();
146+
public test_e017_sug2()
147+
{
148+
printf("%d\n", test_e017_sug2_var); // error 017: undefined symbol "test_e017_sug2_var"; state variable out of scope
149+
}
150+
forward test_e017_sug2_func();
151+
public test_e017_sug2_func() <automaton_3:STATE_1>
152+
{
153+
printf("%d\n", test_e017_sug2_var); // error 017: undefined symbol "test_e017_sug2_var"; state variable out of scope
154+
}
155+
public test_e017_sug2_func() <automaton_3:STATE_2>
156+
{
157+
#pragma unused test_e017_sug2_var
158+
}

0 commit comments

Comments
 (0)