Skip to content

Instantly share code, notes, and snippets.

View derekjw's full-sized avatar

Derek Williams derekjw

  • Cold Logic Solutions
  • Edmonton, Canada
View GitHub Profile
import annotation.unchecked.uncheckedVariance
import reflect.runtime.universe.TypeTag
package object stuff {
// required for the better ??? operator
type MyTypeTag[+A] = TypeTag[A @uncheckedVariance]
def ???[A](implicit tag: MyTypeTag[A]): A =
throw new NotImplementedError(s"unimplemented value of type ${tag.tpe}")
}