Created
March 10, 2014 19:12
-
-
Save adamretter/9472116 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Blah extends App { | |
trait ArgProvider { | |
} | |
case class ColumnReference(value: String) extends ArgProvider | |
abstract class Rule(name: String, val argProviders: ArgProvider*) | |
case class InRule(inValue: ArgProvider) extends Rule("in", inValue) { | |
def valid(): Boolean = { | |
/* | |
When compiled and ran with Scala 2.10.1 | |
this causes a ClassCastException... | |
BUT NOT on Scala 2.10.0 | |
*/ | |
println(inValue.getClass) | |
true | |
} | |
} | |
val rule = InRule(ColumnReference("Column1")) | |
rule.valid() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slightly smaller repro