Last active
January 15, 2016 00:55
-
-
Save andyscott/d588f15b529d1c0e9c81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type F[U <: Universe] = (ToolBox[U], MyUtility[U]) ⇒ Unit | |
def example(f: F[_]) = { | |
val toolbox = scala.reflect.runtime.currentMirror.mkToolBox() | |
val util = MyUtility[toolbox.u.type](toolbox.u) | |
f(toolbox, util) | |
} | |
// usage, doesn't compile | |
example { (tb, util) ⇒ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment