Is there a type in Scala that represents "any string literal"? Like, not just any string but a compile-time constant String literal
You could demand T <: String, and an implicit T :!=: String, but that doesn't rule out non-literal singleton types.
-
-
macros, maybe? :D
-
You could use macros to check the type. Resolve an implicit parameterized on your type which is implemented with a macro, but have the...
End of conversation
New conversation -
-
-
If you haven't seen the impl in Shapeless, :!=:[T1, T2] has ambiguous implicits when the Ts are equal, and a unique implementation when not.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.