- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
parents just don't understand
Wed, 2009-02-11, 18:09
I just commited a fix for this bug:
https://lampsvn.epfl.ch/trac/scala/ticket/1535
However it seems likely the ideal fix lies elsewhere. The crux of the bug is that during that phase, clazz.info.parents does
not return what is apparently expected when called on ClassDecl's clazz.info:
parents = List(BlockStmt, ScalaObject)
I changed the code to use baseClasses, which yields this longer list including the critically missing ASTNode:
baseClasses = List(ClassDecl, BlockStmt, ASTNode, ScalaObject, java.lang.Object)
I feel like perhaps the problem is in the logic for using parentsCache in Types? But I can't find quite tell if I should be
surprised that in a A->B->C hierarchy, C.info.parents might not include A.
BTW this fix breaks binary compatibility rather soundly, as any fix for 1535 necessarily will.
Hi Paul,
parents means immediate parents, so indeed you should not be surprised
about this:
> I feel like perhaps the problem is in the logic for using parentsCache in Types? But I can't find quite tell if I should be
> surprised that in a A->B->C hierarchy, C.info.parents might not include A.
Cheers