Skip to content

Instantly share code, notes, and snippets.

@hubertp
Created March 5, 2012 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hubertp/1979162 to your computer and use it in GitHub Desktop.
Save hubertp/1979162 to your computer and use it in GitHub Desktop.
SO bug in inferExprAlternative
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