Please sign in to comment.
[nomaster] macroExpandAll is now triggered in all invocations of typed
macroExpandAll is the key player in the mechanism of expanding macros after their type arguments have been inferred. (Macro applications that contain yet uninferred type arguments don't get expanded and are delayed until the targs are inferred. Therefore later on we need to trigger those delayed expansions manually, which is done by macroExpandAll). Previously macroExpandAll was only called from a few selected places in the typechecker, but that's quite risky, since typer evolves, and who knows when this scheme breaks. To make things more robust, I'm now calling macroExpandAll in the epilogue of every single call to `typed`. Don't worry - this shouldn't impose noticeable performance penalties, since the call is guarded by a branch upon a plain boolean field. NOTE: This patch is a second take on fixing implicit macros, with the first one being a backport from macro paradise merged into master in January 2013: fe60284. The original fix had an unfortunate error, as described on scala-internals: https://groups.google.com/forum/#!msg/scala-internals/7pA9CiiD3u8, so I had to refine the approach here. This means that it's not possible to directly merge this commit into master, so I'm marking it as [nomaster] and will submit a separate pull request targetting master later on.
- Loading branch information...
Showing with 17 additions and 5 deletions.