summaryrefslogtreecommitdiff
path: root/test/files/pos/t5692a.flags
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-12-31 15:46:47 +0100
committerEugene Burmako <xeno.by@gmail.com>2013-01-09 08:10:48 +0100
commitfe6028476931b031e712c37d3e570125b1d034ae (patch)
tree54a47af764aa7ead11041a5488485c24818cf607 /test/files/pos/t5692a.flags
parent30e2e3a78f9061ea93352427cb0ca205203041f0 (diff)
downloadscala-fe6028476931b031e712c37d3e570125b1d034ae.tar.gz
scala-fe6028476931b031e712c37d3e570125b1d034ae.tar.bz2
scala-fe6028476931b031e712c37d3e570125b1d034ae.zip
SI-5923 adapt macros when they are deferred
Amazingly enough, the fix for the "macro not expanded" problem was super easy. (And I remember spending a day or two trying to find a quick fix somewhen around Scala Days 2012!) The problem was in the implementation of the macro expansion trigger, which was buried in a chain of if-elif-elif. This meant that macro expansion was mutually exclusive with a lot of important adaptations, e.g. with `instantiate`. More precisely, if an expandee contains an undetparam, its expansion should be delayed until all its undetparams are inferred and then retried later. Sometimes such inference can only happen upon a call to instantiate in one of the elif's coming after the macro expansion elif. However this elif would never be called for expandees, because control flow would always enter the macro expansion branch preceding the inference branch. Consequences of this fix are vast. First of all, we can get rid of the "type parameter must be specified" hack. Secondly and most importantly, we can now remove the `materializeImplicit` method from Implicits and rely on implicit macros to materialize tags for us. (This is a tricky change, and I'll do it later after we merge as much of my pending work as possible). Finally, we learn that the current scheme of interaction between macros, type inference and implicits is, in principle, sound!
Diffstat (limited to 'test/files/pos/t5692a.flags')
-rw-r--r--test/files/pos/t5692a.flags1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/pos/t5692a.flags b/test/files/pos/t5692a.flags
new file mode 100644
index 0000000000..cd66464f2f
--- /dev/null
+++ b/test/files/pos/t5692a.flags
@@ -0,0 +1 @@
+-language:experimental.macros \ No newline at end of file