summaryrefslogtreecommitdiff
path: root/test/files/run/t5418a.check
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-18 15:04:20 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-18 15:07:49 +0200
commitfce3f8b2e351494dd8c110b896f731931ae2805e (patch)
tree0ba835180642d9e3683fcb2d2531a192a079a900 /test/files/run/t5418a.check
parent66603a2c003852d39faec20a9763fb0e25049cf4 (diff)
downloadscala-fce3f8b2e351494dd8c110b896f731931ae2805e.tar.gz
scala-fce3f8b2e351494dd8c110b896f731931ae2805e.tar.bz2
scala-fce3f8b2e351494dd8c110b896f731931ae2805e.zip
existentially typed expansions now work fine
If one tries to compile the following code with the parent of this commit: ru.reify(new Object().getClass) then the following error will occur: Test.scala:2: error: type mismatch; found : $u.Expr[Class[_ <: Object]] required: reflect.runtime.universe.Expr[Class[?0(in value <local Test>)]] where type ?0(in value <local Test>) <: Object ru.reify(new Object().getClass) ^ This happens because macro expansions are always typechecked against the return type of their macro definitions instantiated in the context of expandee. In this case the expected type contains skolems which are incompatible with wildcards in the type of the expansion. I tried all the incantations I could think of - without any success. Luckily I met Martin who pointed me at the same problem solved in adapt (see the diff w.r.t Typers.scala).
Diffstat (limited to 'test/files/run/t5418a.check')
-rw-r--r--test/files/run/t5418a.check1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/run/t5418a.check b/test/files/run/t5418a.check
new file mode 100644
index 0000000000..ee0e80e11f
--- /dev/null
+++ b/test/files/run/t5418a.check
@@ -0,0 +1 @@
+Expr[Class[_ <: java.lang.Object]](new Object().getClass())