Skip to content
Browse files

SI-6572 Test case, originally fixed in a3680be.

That fix has now been backported to 2.10.x in the
previous commit. This commit should be be merged
to master.
  • Loading branch information...
1 parent 0679da5 commit 16eaefb35cdea0f0380a7c5bda395f9b863bf8b3 @retronym retronym committed Jan 29, 2013
Showing with 36 additions and 0 deletions.
  1. +19 −0 test/files/run/t6572/bar_1.scala
  2. +17 −0 test/files/run/t6572/foo_2.scala
View
19 test/files/run/t6572/bar_1.scala
@@ -0,0 +1,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
+
+}
View
17 test/files/run/t6572/foo_2.scala
@@ -0,0 +1,17 @@
+//package foo
+
+import bar._
+
+class FooProvider extends IntProvider {
+ def int = 3
+}
+
+class Wrapper(users: DefaultIntBase[FooProvider]) {
+ final def user(userId: Int) = users.get(userId)
+}
+
+object Test {
+ def main(args: Array[String]) {
+ new Wrapper(new DefaultIntBase)
+ }
+}

0 comments on commit 16eaefb

Please sign in to comment.
Something went wrong with that request. Please try again.