blob: 5518ced7afa841e044292d6ffc4e44f0ac65970d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package bar
abstract class IntBase[V] extends Base[Int, V]
class DefaultIntBase[V <: IntProvider] extends IntBase[V] {
override protected def hashCode(key: Int) = key
}
trait IntProvider {
def int: Int
}
abstract class Base[@specialized K, V] {
protected def hashCode(key: K) = key.hashCode
def get(key: K): V = throw new RuntimeException
}
|