ghkweon / dwscript

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

"Bug" in TdwsInterface (dwsComp.pas) #472

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
While modifying the test suite for TdwsUnit, almost every test suddenly failed 
when I defined an interface. There are no tests to define an interface, so I'm 
guessing that's why it wasn't caught before.

In TdwsInterface.DoGenerate, GetUnit.GetSymbol is called to find the ancestor 
interface. When no ancestor is set, the method tries to generate a symbol which 
seems to mess up the symbol table.

I'm guessing that either it should default to IInterface as ancestor or 
DoGenerate should include a check for an empty string as FAncestor and prevent 
it from calling GetSymbol in that case.

Original issue reported on code.google.com by frederic...@gmail.com on 2 Jul 2014 at 9:33