Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created September 19, 2014 14:54
Show Gist options
  • Save djspiewak/cb5d1fe36b771442bf0e to your computer and use it in GitHub Desktop.
Save djspiewak/cb5d1fe36b771442bf0e to your computer and use it in GitHub Desktop.
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}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment