Created
March 5, 2012 16:32
-
-
Save hubertp/1979162 to your computer and use it in GitHub Desktop.
SO bug in inferExprAlternative
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
trait Base[T] | |
trait Foo[T] extends Base[T] { | |
} | |
object Impl { | |
implicit def f[Z](a: Foo[Z]): Result = null | |
implicit def f[Z](a: Base[Z]): Result = null | |
} | |
//import Impl._ | |
trait Result | |
object Foo { | |
def apply[T](a: Int): Base[T] = new Foo[T]{} | |
def apply[T](z: String="abc"): Base[T] = new Foo[T]{} | |
// def apply[T]: Foo[T] = new Foo[T]{} | |
} | |
object Test { | |
// def test[T]: Base[T] = Foo[T] | |
def test[T]: Int = Foo[T] | |
// def test[T]: Result = Foo[T] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment