Boo

compiler error on referencing inherited member of generic subclass instance

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8.1
  • Fix Version/s: 0.8.2
  • Component/s: Compiler
  • Labels:
    None
  • Environment:
    Windows XP
    .Net 2.0
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

class Class[of T]:
pass

print c.ToString()

Error BCE0055: Internal compiler error: Operation is not valid due to the current state of the object..

The attached patch causes GenericConstructedType.Resolve() to check if an entity really should be mapped before trying to pass it to GenericMapping.Map(). But now that I think about it, this issue can occur in other places. So maybe GenericMapping should be responsible for doing that checking so that such checks are localized to one place. GenericMapping.Map() may also be where BOO-973 can be fixed.

Activity

Hide
Spruce Weber added a comment -

This patch fixes the issue by modifying the method GenericConstructedType.Resolve() to use GenericMapping.EntityNeedsMapping() (which was added as a patch to fix BOO-973) in order to determine if an entity needs to be mapped.

Show
Spruce Weber added a comment - This patch fixes the issue by modifying the method GenericConstructedType.Resolve() to use GenericMapping.EntityNeedsMapping() (which was added as a patch to fix BOO-973) in order to determine if an entity needs to be mapped.
Hide
Marcus Griep added a comment -

Committed revision 2885

Show
Marcus Griep added a comment - Committed revision 2885

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: