Skip to content

Commit 6c8a2bc

Browse files
committed
fbc: improve error message on statement between SELECT and first CASE inside a subroutine
1 parent 4b57510 commit 6c8a2bc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Version 1.09.0
3636
- rtlib: define fb_AtomicSetThreadFlags() even in the non-multithreaded version of run time library - it is needed by thread_core.c:threadproc() - unusual but not impossible to link the non-multithreaded rtlib and call thread functions
3737
- darwin: a variety of improvements to allow compiling and linking (TeeEmCee)
3838
- gfxlib2: fix d2d scaling issues for high dpi (adeyblue)
39+
- fbc: improve error message on statement between SELECT and first CASE inside a subroutine
3940

4041

4142
Version 1.08.0

src/compiler/parser-compound.bas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,11 @@ function cCompStmtIsAllowed( byval allowmask as FB_CMPSTMT_MASK ) as integer
731731

732732
'' error..
733733
if( fbIsModLevel( ) = FALSE ) then
734-
errmsg = FB_ERRMSG_ILLEGALINSIDEASUB
734+
if( stk->id = FB_TK_SELECT ) then
735+
errmsg = FB_ERRMSG_ILLEGALINSIDESELECT
736+
else
737+
errmsg = FB_ERRMSG_ILLEGALINSIDEASUB
738+
end if
735739
else
736740
if( symbIsGlobalNamespc( ) ) then
737741
if( stk->id = FB_TK_SELECT ) then

0 commit comments

Comments
 (0)