CreateInfoOnSymbol(TAssociativeArraySymbol) causes assertion failure

Issue #78 closed
Anders Melander created an issue

dwsInfo.CreateInfoOnSymbol calls TInfo.SetChild which does not support TAssociativeArraySymbol.

Maybe a more safe design of TInfo.SetChild would be to have an abstract method on TSymbol return a IInfo object or a TInfo class. This would decouple the concrete types from TInfo and ensure that future new types are handled.

Comments (3)

  1. Eric Grange repo owner

    Having such a method in TSymbol would create a high coupling between TSymbol and IInfo, which would be less desirable in the long run as IInfo is just one way of accessing internal structures.

    IInfo is essentially a loosely typed wrapper for internal structures, quite verbose and inefficient, and is being slowly moved out of the core at every opportunity.

    Some explicit dynamic registration mechanisms could make it more decoupled, but it's an area with still relatively limited unit test coverage (and limited use here, so high risk of breaking stuff).

  2. Log in to comment