diff options
author | Paul Phillips <paulp@improving.org> | 2013-10-12 10:50:02 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-10-12 10:50:02 -0700 |
commit | ede4a958aa79aa07ed62283fc74314f2611d3dc4 (patch) | |
tree | c5a655a3380251f9ab32d63713b496f7f55ad17e | |
parent | cd966a1b33001988beca92e96181f6d49043babb (diff) | |
parent | 03a06e02483eaf442158339c2edd6bcfd99847a3 (diff) | |
download | scala-ede4a958aa79aa07ed62283fc74314f2611d3dc4.tar.gz scala-ede4a958aa79aa07ed62283fc74314f2611d3dc4.tar.bz2 scala-ede4a958aa79aa07ed62283fc74314f2611d3dc4.zip |
Merge pull request #3025 from retronym/ticket/7902
SI-7902 Fix spurious kind error due to an unitialized symbol
-rw-r--r-- | src/reflect/scala/reflect/internal/Kinds.scala | 1 | ||||
-rw-r--r-- | test/files/pos/t7902.scala | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala index d1c215713e..d48a6c6322 100644 --- a/src/reflect/scala/reflect/internal/Kinds.scala +++ b/src/reflect/scala/reflect/internal/Kinds.scala @@ -185,6 +185,7 @@ trait Kinds { ) } else { + hkarg.initialize // SI-7902 otherwise hkarg.typeParams yields List(NoSymbol)! debuglog("checkKindBoundsHK recursing to compare params of "+ hkparam +" with "+ hkarg) kindErrors ++= checkKindBoundsHK( hkarg.typeParams, diff --git a/test/files/pos/t7902.scala b/test/files/pos/t7902.scala new file mode 100644 index 0000000000..47c525c179 --- /dev/null +++ b/test/files/pos/t7902.scala @@ -0,0 +1,17 @@ +import scala.language.higherKinds + +object Bug { + class Tag[W[M1[X1]]] + + def ofType[W[M2[X2]]]: Tag[W] = ??? + type InSeq [M3[X3]] = Some[M3[Any]] + + // fail + val x = ofType[InSeq] + + // okay + val y: Any = ofType[InSeq] + object T { + val z = ofType[InSeq] + } +} |