-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Not
not working; alternative definition doesn't need to be intrinsic?
#5234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Clarification: the |
You need to use Not2 as part of the implicit search of some other thing to run into trouble, see #3421 (comment) from the PR where Not was introduced for an example. |
It appears to depend on object Test {
import implicits.Not
class Foo
implicit def foo: Foo = ???
def foo[T](implicit ev: Not[T]) = ???
foo[Foo]
} |
Yeah looks like the divergence check is broken when the expected type happens to be a wildcard at that point, we check |
It looks like this is fixed |
Not
not working; alternative definition doesn't need to be intrinsic?
|
Correction: I see what purpose it serves ... it's not clear to me why it needs to be a compiler intrinsic. |
Have you seen the discussion in #3421 (comment) ? |
@smarter maybe I'm looking at the wrong thing but on current master the negation-as-failure example in that comment behaves as I would expect it to. It's negation, and not intrinsic. |
Try compiling |
The following compiles, but shouldn't,
It also appears that the following traditional negation as failure encoding of
Not
works as it would in Scala 2,The text was updated successfully, but these errors were encountered: