summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-02-07 16:45:27 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-02-07 16:45:27 -0800
commit427e1864aec01b3b23ddc133c2090eec5c201be0 (patch)
tree647dbee745a5dee2c6520fd9e06a243eeedd9838 /src
parent4d618dca20cad709fd3f4b2346374e1c54501e01 (diff)
parent0d68a874e2158d9739abd3977ae0d9edd4a76e59 (diff)
downloadscala-427e1864aec01b3b23ddc133c2090eec5c201be0.tar.gz
scala-427e1864aec01b3b23ddc133c2090eec5c201be0.tar.bz2
scala-427e1864aec01b3b23ddc133c2090eec5c201be0.zip
Merge pull request #2084 from scalamacros/ticket/6113
SI-6113 typeOf now works for type lambdas
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/reify/codegen/GenTypes.scala3
-rw-r--r--src/compiler/scala/reflect/reify/phases/Reify.scala5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/reify/codegen/GenTypes.scala b/src/compiler/scala/reflect/reify/codegen/GenTypes.scala
index 7aa87dc2f8..bb7e1f9b56 100644
--- a/src/compiler/scala/reflect/reify/codegen/GenTypes.scala
+++ b/src/compiler/scala/reflect/reify/codegen/GenTypes.scala
@@ -69,8 +69,7 @@ trait GenTypes {
def reificationIsConcrete: Boolean = state.reificationIsConcrete
def spliceType(tpe: Type): Tree = {
- val quantified = currentQuantified
- if (tpe.isSpliceable && !(quantified contains tpe.typeSymbol)) {
+ if (tpe.isSpliceable && !(boundSymbolsInCallstack contains tpe.typeSymbol)) {
if (reifyDebug) println("splicing " + tpe)
val tagFlavor = if (concrete) tpnme.TypeTag.toString else tpnme.WeakTypeTag.toString
diff --git a/src/compiler/scala/reflect/reify/phases/Reify.scala b/src/compiler/scala/reflect/reify/phases/Reify.scala
index dc0028be38..8e13a45cdb 100644
--- a/src/compiler/scala/reflect/reify/phases/Reify.scala
+++ b/src/compiler/scala/reflect/reify/phases/Reify.scala
@@ -28,7 +28,10 @@ trait Reify extends GenSymbols
finally currents = currents.tail
}
}
- def currentQuantified = flatCollect(reifyStack.currents)({ case ExistentialType(quantified, _) => quantified })
+ def boundSymbolsInCallstack = flatCollect(reifyStack.currents) {
+ case ExistentialType(quantified, _) => quantified
+ case PolyType(typeParams, _) => typeParams
+ }
def current = reifyStack.currents.head
def currents = reifyStack.currents