You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently macros don't expand unless all the type arguments are inferred. This means that type inference uses the return types of macro defs rather than actual types of expansions.
To fix the inconsistency we should expand macros at will, giving them a possibility to control their pre-inference shape and a post-inference hook to transform early expansions after type arguments are inferred.
The text was updated successfully, but these errors were encountered:
Currently macros don't expand unless all the type arguments are inferred. This means that type inference uses the return types of macro defs rather than actual types of expansions.
This is a sane design decision (otherwise typetag generation wouldn't work), but it's inconsistent with how macro return types work when type inference isn't involved: http://stackoverflow.com/questions/13669974/static-return-type-of-scala-macros.
To fix the inconsistency we should expand macros at will, giving them a possibility to control their pre-inference shape and a post-inference hook to transform early expansions after type arguments are inferred.
The text was updated successfully, but these errors were encountered: