Created
October 25, 2011 10:50
-
-
Save gtani7/1312269 to your computer and use it in GitHub Desktop.
Dependent method types
This file contains 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
scala> trait Foo { type Bar } | |
defined trait Foo | |
scala> def withFoo(foo: Foo): foo.Bar = // The return type depends on the parameter! | |
| sys.error("Not yet implemented") | |
withFoo: (foo: Foo)foo.Bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment