Skip to content

Commit

Permalink
array param REDIM: Check dimension count, if known
Browse files Browse the repository at this point in the history
  • Loading branch information
dkl committed Jun 20, 2015
1 parent 0cc49ec commit 0fdd8ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion changelog.txt
Expand Up @@ -44,7 +44,7 @@ Version 1.03.0
- Various bindings: Some trivial "inline" functions are now turned into macros; fixed some cases of missing information about renamed symbols (e.g. in SDL2 binding)
- Some built-in functions with wstring parameters (e.g. Val(), Left(), Right()) accepted integers and pointers in place of the wstring (e.g. Val(0)). This triggers an error now.
- #772: Types with the same name but in different namespaces compared as equal in #if typeof(...) = typeof(...) checks and #print typeof(...) output, because the namespace prefix was not included in textual typeof()'s result string.
- For dynamic array parameters with specified number of dimensions (e.g. <(any) as integer> instead of <() as integer>), the number of dimensions in accesses is now checked at compile-time, like dynamic array variables
- For dynamic array parameters with specified number of dimensions (e.g. <(any) as integer> instead of <() as integer>), the number of dimensions in accesses and REDIMs is now checked at compile-time, like dynamic array variables


Version 1.02.1
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/parser-decl-var.bas
Expand Up @@ -437,7 +437,7 @@ private function hAddVar _
end if

if( is_declared ) then
if( symbIsDynamic( sym ) ) then
if( symbGetIsDynamic( sym ) ) then
symbCheckDynamicArrayDimensions( sym, dimensions )
end if
else
Expand Down
5 changes: 5 additions & 0 deletions tests/functions/bydesc-known-dimensions-redim.bas
@@ -0,0 +1,5 @@
' TEST_MODE : COMPILE_ONLY_FAIL

sub f( array(any) as integer )
redim array(0 to 1, 0 to 1)
end sub

0 comments on commit 0fdd8ce

Please sign in to comment.