[dws-developer] Bug in Tdws2Compiler.ReadName
Brought to you by:
hhernler,
mackermann
From: Wilbert v. L. <w.v...@ks...> - 2004-01-16 14:37:27
|
Gents, Here is the scenario - I have added an array in my Tdws2Unit descendant: LongMonthNames. It is now a part of MyUnit.Arrays. I could not get a script compiled wherein I used LongMonthnames. It kept on whining about a missing '(' where I put the '[' for i := 1 to 12 do LongMonthNames[i] := ... (Actually, the array is initialised elsewhere, but that is not important now.) Problem can be traced back to Tdws2Compiler.ReadName: there is no proviso for symbols of class TStaticArraySymbol. So it falls through until it reaches TTypeSymbol (TStaticArraySymbol is derived from this class) and then the parser thinks that my array is a typecast: else if sym is TFuncSymbol then Result := ReadSymbol(ReadFunc(TFuncSymbol(sym), IsWrite), IsWrite) // Type casts else if sym is TTypeSymbol then Result := ReadTypeCast(namePos, sym) ^--- EScriptError is triggered here else FMsgs.AddCompilerStop(FTok.HotPos, Format(CPE_UnknownType, [sym.Caption])); Question: how do I resolve this situation? Best regards, Wilbert |