Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

SO-analysis

View SO-analysis.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
% cat sandbox/test1.scala
package test
 
sealed trait A[T]
object A {
implicit object AInt extends A[Int]
implicit object AString extends A[String]
}
 
% cat sandbox/test.scala
package test
 
object Bar{
def foo[T : A](b: T) = println(b)
def main(args: Array[String]) {
foo(3)
}
}
 
% scalac210 -version
Scala code runner version 2.10.3 -- Copyright 2002-2012, LAMP/EPFL
 
% scalac210 sandbox/test.scala sandbox/test1.scala
% scalac210 sandbox/test1.scala sandbox/test.scala
% scalac210 sandbox/test1.scala && scalac210 sandbox/test.scala
% cat test/test.scala
package test

object Bar {
  def foo[T: A](b: T) = println(b)
  def main(args: Array[String]) {
    foo(3)
  }
}

sealed trait A[T]

object A {
  implicit object AInt extends A[Int]
  implicit object AString extends A[String]
}

% scalac -version
Scala compiler version 2.10.3 -- Copyright 2002-2013, LAMP/EPFL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.