diff --git a/check/fixes.frm b/check/fixes.frm index e3a22cd5..b3c92d13 100644 --- a/check/fixes.frm +++ b/check/fixes.frm @@ -4448,6 +4448,21 @@ assert warning?("Excess information in symmetric properties") assert warning?("Illegal information in number of arguments properties") assert warning?("Undefined $-variable") *--#] Issue766 : +*--#[ Issue782 : +S $s; +V $v; +I $i; +F $f; +Set $ss; +Local $test = 1; +.end +assert compile_error?("Illegally formed name in symbol statement") +assert compile_error?("Illegally formed name in vector statement") +assert compile_error?("Illegally formed name in index statement") +assert compile_error?("Illegally formed function/tensor name") +assert compile_error?("Illegal name for set") +assert compile_error?("Illegal name for expression") +*--#] Issue782 : *--#[ PullReq535 : * This test requires more than the specified 50K workspace. #:maxtermsize 200 diff --git a/sources/comexpr.c b/sources/comexpr.c index f352b447..c4c52082 100644 --- a/sources/comexpr.c +++ b/sources/comexpr.c @@ -112,7 +112,8 @@ int DoExpr(UBYTE *inp, int type, int par) else p++; } if ( *p ) { /* Variety with the = sign */ - if ( ( q = SkipAName(inp) ) == 0 || q[-1] == '_' ) { + q = SkipAName(inp); + if ( *inp == '$' || q == 0 || q[-1] == '_' ) { MesPrint("&Illegal name for expression"); error = 1; if ( q[-1] == '_' ) { diff --git a/sources/names.c b/sources/names.c index d07abd4a..d9155f31 100644 --- a/sources/names.c +++ b/sources/names.c @@ -3262,6 +3262,7 @@ int TestName(UBYTE *name) } while ( *name ) { if ( *name == '_' ) return(-1); + if ( *name == '$' ) return(-1); name++; } return(0);