diff options
author | Evgeny Kotelnikov <evgeny.kotelnikov@gmail.com> | 2013-01-19 17:42:12 +0400 |
---|---|---|
committer | Evgeny Kotelnikov <evgeny.kotelnikov@gmail.com> | 2013-01-22 14:13:04 +0400 |
commit | 0a25ee3431d0314c782dd2e6620bc75c4de0d1a4 (patch) | |
tree | 130207bea20e8cc2440bcd33259786ed38837c50 /src/compiler/scala/reflect/reify/codegen/GenTrees.scala | |
parent | 1e69a0b67a184ca9d0b205a407e34cf85d11372c (diff) | |
download | scala-0a25ee3431d0314c782dd2e6620bc75c4de0d1a4.tar.gz scala-0a25ee3431d0314c782dd2e6620bc75c4de0d1a4.tar.bz2 scala-0a25ee3431d0314c782dd2e6620bc75c4de0d1a4.zip |
SI-5824 Fix crashes in reify with _*
Reification crashes if "foo: _*" construct is used. This happens besause type tree is represented either with TypeTree, or with Ident (present case), and `toPreTyperTypedOrAnnotated' only matches of the former. The fix is to cover the latter too. A test is included.
Diffstat (limited to 'src/compiler/scala/reflect/reify/codegen/GenTrees.scala')
-rw-r--r-- | src/compiler/scala/reflect/reify/codegen/GenTrees.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/reify/codegen/GenTrees.scala b/src/compiler/scala/reflect/reify/codegen/GenTrees.scala index f60089c935..fd3673552b 100644 --- a/src/compiler/scala/reflect/reify/codegen/GenTrees.scala +++ b/src/compiler/scala/reflect/reify/codegen/GenTrees.scala @@ -177,7 +177,7 @@ trait GenTrees { // then we can reify the scrutinee as a symless AST and that will definitely be hygienic // why? because then typechecking of a scrutinee doesn't depend on the environment external to the quasiquote // otherwise we need to reify the corresponding type - if (sym.isLocalToReifee || tpe.isLocalToReifee) + if (tree.symbol.isLocalToReifee || tree.tpe.isLocalToReifee || treeInfo.isWildcardStarType(tree)) reifyProduct(tree) else { if (reifyDebug) println("reifying bound type %s (underlying type is %s)".format(sym, tpe)) |