|
Sean edited on 2006-11-10 12:26:08.0
|
|
Maybe a duplicate of #806, but I thought this bug went away for awhile without #806 being closed. At anyrate, I'm still running into this problem.
|
|
Martin edited on 2006-11-10 18:36:11.0
|
|
It's code generated by pattern matcher so I reassign to Burak.
|
|
Burak edited on 2006-11-10 18:55:00.0
|
I can tell without looking at any code that the reason for this are Martin's latest GADT hacks (why would we require an OtherImpl with DoubleQuotedImpl?)
The following problem works, so it is not clear to me what I should do fix:
def asDQ(node : OtherImpl) = node match {
case dq : DoubleQuoteImpl => dq:DoubleQuoteImpl;
}
IMHO the "better" types that the typer spits out after inference must be communicated to the pattern matcher somehow. I guess it is just a matter of assigning the right type to the typed pattern in the typer, but have to check.
|
|
Burak edited on 2006-11-13 13:20:10.0
|
I fixed this in a way that is robust again typer - behavior by using the type of the symbol rather than the type in the tree. However, I still think it odd that the tree does not fully reflect the type, the tree should be rewritten to
//after typer
case dq: OtherImpl with DoubleQuoteImpl =>
but that's just a maintainability issue.
|