Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor fixes to reification

  • Loading branch information...
commit 3ddd3486095c3d6a87f723e0ff8187d1b08f5507 1 parent 3c9c18d
Eugene Burmako xeno-by authored
1  src/compiler/scala/reflect/reify/phases/Calculate.scala
View
@@ -46,6 +46,7 @@ trait Calculate {
bindRelatedSymbol(tree.symbol.companionClass, "companionClass")
bindRelatedSymbol(tree.symbol.companionModule, "companionModule")
Some(tree.symbol) collect { case termSymbol: TermSymbol => bindRelatedSymbol(termSymbol.referenced, "referenced") }
+ Some(tree) collect { case labelDef: LabelDef => labelDef.params foreach (param => bindRelatedSymbol(param.symbol, "labelParam")) }
def bindRelatedSymbol(related: Symbol, name: String): Unit =
if (related != null && related != NoSymbol) {
if (reifyDebug) println("boundSym (" + name + "): " + related)
1  test/files/run/t5271_1.check
View
@@ -9,3 +9,4 @@
};
()
}
+()
1  test/files/run/t5271_1.scala
View
@@ -7,4 +7,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
2  test/files/run/t5271_2.check
View
@@ -10,3 +10,5 @@
val c = C.apply(2, 2);
scala.this.Predef.println(c.foo.$times(c.bar))
}
+4
+()
1  test/files/run/t5271_2.scala
View
@@ -9,4 +9,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
2  test/files/run/t5271_3.check
View
@@ -17,3 +17,5 @@
val c = C.apply(2, 2);
scala.this.Predef.println(c.foo.$times(c.bar).$eq$eq(C.qwe))
}
+true
+()
1  test/files/run/t5271_3.scala
View
@@ -10,4 +10,5 @@ object Test extends App {
val toolbox = mkToolBox()
println(code.tree)
+ println(code.eval)
}
2  test/pending/run/t5258a.scala
View
@@ -1,3 +1,5 @@
+import scala.reflect.mirror._
+
object Test extends App {
reify {
println(classOf[Int])
2  test/pending/run/t5258b.scala
View
@@ -1,3 +1,5 @@
+import scala.reflect.mirror._
+
object Test extends App {
reify {
class C
2  test/pending/run/t5258c.scala
View
@@ -1,3 +1,5 @@
+import scala.reflect.mirror._
+
object Test extends App {
reify {
object E extends Enumeration { val foo, bar = Value }
0  test/pending/run/t5271_1.check
View
No changes.
7 test/pending/run/t5271_1.scala
View
@@ -1,7 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- reify {
- case class C(foo: Int, bar: Int)
- }.eval
-}
1  test/pending/run/t5271_2.check
View
@@ -1 +0,0 @@
-4
9 test/pending/run/t5271_2.scala
View
@@ -1,9 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- reify {
- case class C(foo: Int, bar: Int)
- val c = C(2, 2)
- println(c.foo * c.bar)
- }.eval
-}
1  test/pending/run/t5271_3.check
View
@@ -1 +0,0 @@
-true
10 test/pending/run/t5271_3.scala
View
@@ -1,10 +0,0 @@
-import scala.reflect.mirror._
-
-object Test extends App {
- reify {
- object C { def qwe = 4 }
- case class C(foo: Int, bar: Int)
- val c = C(2, 2)
- println(c.foo * c.bar == C.qwe)
- }.eval
-}
Please sign in to comment.
Something went wrong with that request. Please try again.