HuubGitHub / dwscript

Automatically exported from code.google.com/p/dwscript
1 stars 0 forks source link

TProgramInfo.GetParams does not support "set of enum" values #467

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Trying to read a "set" value via TProgramInfo.Params[] causes an assertion 
failure in TInfo.SetChild (in the last line). This is the call stack:

dwsInfo.TInfo.SetChild(nil,$FE4C280,$FEAC280,TDataContext($1003C000) as 
IDataContext,nil)
dwsExprs.GetVarParamVars($FEAA908,10,nil)
dwsExprs.GetDataSymbol($FEAA908,nil)
dwsExprs.TProgramInfo.GetSymbolInfo($FEAA908,nil)
dwsExprs.TProgramInfo.GetParams(0)

The problem is that the TSetOfSymbol symbol type isn't supported.

As far as I can tell, the solution is to change the following in TInfo.SetChild 
from:

   if    (baseType is TBaseSymbol)
      or (baseType is TEnumerationSymbol)
      or (baseType is TConnectorSymbol) then
         Result := TInfoData.Create(ProgramInfo, ChildTypeSym, childDataPtr, ChildDataMaster)

to:

   if    (baseType is TBaseSymbol)
      or (baseType is TEnumerationSymbol)
      or (baseType is TConnectorSymbol) 
      or (baseType is TSetOfSymbol) { <--- Add this } then
         Result := TInfoData.Create(ProgramInfo, ChildTypeSym, childDataPtr, ChildDataMaster)

Original issue reported on code.google.com by anders.b...@gmail.com on 19 Apr 2014 at 8:19

GoogleCodeExporter commented 8 years ago

Original comment by zar...@gmail.com on 23 Apr 2014 at 3:42

GoogleCodeExporter commented 8 years ago
Fixed by r2531. Please close.

Original comment by anders.b...@gmail.com on 29 Apr 2014 at 2:36

GoogleCodeExporter commented 8 years ago

Original comment by zar...@gmail.com on 29 Apr 2014 at 3:15