|
Scala example source code file (bug3136.scala)
The Scala bug3136.scala source codeclass Type class Symbol case class PolyType(tps: List[Symbol], res: Type) extends Type class OtherType extends Type // case class NullaryMethodType(tp: Type) extends Type object NullaryMethodType { def apply(resTpe: Type): Type = PolyType(List(), resTpe) def unapply(tp: Type): Option[(Type)] = None } object Test { def TEST(tp: Type): String = tp match { case PolyType(ps1, PolyType(ps2, res @ PolyType(a, b))) => "1"+tp // couldn't find a simpler version that still crashes case NullaryMethodType(meh) => "2"+meh } } Other Scala examples (source code examples)Here is a short list of links related to this Scala bug3136.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.