summaryrefslogtreecommitdiff
path: root/test/junit
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-01-31 21:09:24 +0100
committerEugene Burmako <xeno.by@gmail.com>2014-01-24 23:01:20 +0300
commit8b87327d4a3e8145c5716ec4883c497d86739281 (patch)
treedcbe3893d3e2cff2c784d7622a413f520bf41ad0 /test/junit
parentf22ddce265e8622e95f5e9cab4d38168bf2c3bf8 (diff)
downloadscala-8b87327d4a3e8145c5716ec4883c497d86739281.tar.gz
scala-8b87327d4a3e8145c5716ec4883c497d86739281.tar.bz2
scala-8b87327d4a3e8145c5716ec4883c497d86739281.zip
SI-6411 reflection is now aware of posterasure
The `transformedType` method, which is used to bring Scala types to Java world, was written in pre-valueclass times. Therefore, this method only called transforms from erasure, uncurry and refChecks. Now runtime reflection becomes aware of posterasure and as a consequence methods, which have value classes in their signatures, can be called without having to wrap them in catch-a-crash clause. Another facet to this fix was the realization that value classes need to be unwrapped, e.g. C(2) needs to be transformed to just 2, when they are used naked in method signatures (i.e. `c` in `def foo(c: C)` needs to be unwrapped, whereas `cs: List[C]`, `cs: C*` and even `cs: Array[C]` do not).
Diffstat (limited to 'test/junit')
-rw-r--r--test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
index a3699a4eeb..b42e9a07cb 100644
--- a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
+++ b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala
@@ -69,6 +69,7 @@ class SymbolTableForUnitTesting extends SymbolTable {
// Members declared in scala.reflect.internal.Required
def picklerPhase: scala.reflect.internal.Phase = SomePhase
+ def erasurePhase: scala.reflect.internal.Phase = SomePhase
// Members declared in scala.reflect.internal.SymbolTable
def currentRunId: Int = 1