diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-02-09 18:00:20 +0100 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-02-09 18:00:20 +0100 |
commit | b66a39653b9bccab72036ba58fec5fd7d596d313 (patch) | |
tree | 31e5f4dfb02a6c7e70ac2b8be6d5fa1589ae27ba | |
parent | 5720e97b95da57c9549698a9038efb79092394ad (diff) | |
parent | 5f4011ef2969e4c4ac93f570bef45e9afb65bb9a (diff) | |
download | scala-b66a39653b9bccab72036ba58fec5fd7d596d313.tar.gz scala-b66a39653b9bccab72036ba58fec5fd7d596d313.tar.bz2 scala-b66a39653b9bccab72036ba58fec5fd7d596d313.zip |
Merge pull request #3491 from retronym/backport/7902v2.10.4-RC3v2.10.4
[backport] SI-7902 Fix spurious kind error due to an unitialized symbol
-rw-r--r-- | src/reflect/scala/reflect/internal/Kinds.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t7902.scala | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala index 08686832ef..3ab7b20ecd 100644 --- a/src/reflect/scala/reflect/internal/Kinds.scala +++ b/src/reflect/scala/reflect/internal/Kinds.scala @@ -184,6 +184,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, @@ -229,4 +230,4 @@ trait Kinds { } } } -}
\ No newline at end of file +} 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] + } +} |