Implicit macro. Default implicit value. How?
问题 I don't even know how to ask the question. I have a macro that creates an instance of IsEnum[T] for a type T . I'm doing testing for it, and want to make sure that the implicit is not found for types that are not sealed, or that, in general, don't meet the requirements of an enum. So I created this method for testing def enumOf[T](implicit isEnum:IsEnum[T] = null) = isEnum And then I ensure that enumOf[NotAnEnum] == null But instead, it fails at compile time. One thing is the macro erroring.