diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-01-05 02:11:47 +0300 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-01-09 08:10:48 +0100 |
commit | 143cd7a307706a8884c9352e64addf6e9be0a181 (patch) | |
tree | 291ddfddd694a894158b35939b8bded093f61df2 /test/files/run/t5353.check | |
parent | fe6028476931b031e712c37d3e570125b1d034ae (diff) | |
download | scala-143cd7a307706a8884c9352e64addf6e9be0a181.tar.gz scala-143cd7a307706a8884c9352e64addf6e9be0a181.tar.bz2 scala-143cd7a307706a8884c9352e64addf6e9be0a181.zip |
macroExpandAll is now triggered by typed
Previously delayed macro expansions (the sole purpose of macroExpandAll)
were triggered by `typedArgs`. Probably I wanted to save CPU cycles on
not checking whether we have pending macro expansions on every iteration
of typecheck.
However this optimization is uncalled for, because the check just entails
reading a var, therefore benefits of the current approach are negliible,
whereas the robustness hit is tangible.
After delayed macro expansion mechanism became more robust, it exposed
a bug, well-hidden before. If one first delays a macro and then finds out
that the expandee is erroneous, subsequent `macroExpandAll` will crash,
because it expects a macro runtime attachment to be present. Previously
the erroneous code path never got triggered, because the macro expansion
never commenced. Luckily the fix was easy.
Diffstat (limited to 'test/files/run/t5353.check')
-rw-r--r-- | test/files/run/t5353.check | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/files/run/t5353.check b/test/files/run/t5353.check new file mode 100644 index 0000000000..a2906793ed --- /dev/null +++ b/test/files/run/t5353.check @@ -0,0 +1,2 @@ +1 +[Ljava.lang.Object; cannot be cast to [Ljava.lang.String; |