I feel like I should be waving a dead chicken w...
I feel like I should be waving a dead chicken w...

I feel like I should be waving a dead chicken with this commit.

As was discussed in scala-devel, the pattern matching for Scanners
generates very nested if statements. This makes the typechecker work
really hard to check these if statements, descending into a deeply
nested tree. This can blow the stack.

So, what's the solution? Don't touch Scanners at all. Change the
definition format for four character constants in SourceFile.scala.
Suddenly the problem goes away and we get a lovely big switch statement.
The type checker no longer has to do all that work.

Clearly this is a bug in the pattern matcher. See #1456. But as I
don't know when I'll have a fix for that, this works as a temporary
workaround. I don't understand why it works yet, but it does.

Hence the sacrificial chicken. 

All hail Zog, protector of the type checker!


jvican/scala,slothspot/scala,scala/scala,slothspot/scala,felixmulder/scala,slothspot/scala,lrytz/scala,scala/scala,scala/scala,felixmulder/scala,martijnhoekstra/scala,martijnhoekstra/scala,scala/scala,scala/scala,jvican/scala,jvican/scala,felixmulder/scala,martijnhoekstra/scala,scala/scala,lrytz/scala,felixmulder/scala,slothspot/scala,slothspot/scala,lrytz/scala,felixmulder/scala,martijnhoekstra/scala,martijnhoekstra/scala,jvican/scala,jvican/scala,felixmulder/scala,shimib/scala,shimib/scala,shimib/scala,lrytz/scala,jvican/scala,slothspot/scala,lrytz/scala,felixmulder/scala,shimib/scala,slothspot/scala,martijnhoekstra/scala,shimib/scala,lrytz/scala,jvican/scala,shimib/scala