Skip to content

Rename Not to NotGiven #10533

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

Closed

Conversation

therealcisse
Copy link
Contributor

@therealcisse therealcisse commented Nov 27, 2020

I think this is a much cooler name for this concept.

This is my first PR and Trial to open up a discussion whether this makes sense or not.

@odersky
Copy link
Contributor

odersky commented Nov 28, 2020

I also think that NotGiven is a promising choice. Before we can merge this I believe it should be discussed on contributors. Can you open a thread there?

@therealcisse
Copy link
Contributor Author

Will do.

@therealcisse
Copy link
Contributor Author

@odersky I need some help fixing tests. tests/run/i3396.scala won't compile for some reason.

I am getting the following error:

-- Error: tests/run/i3396.scala:19:31 ------------------------------------------
19 |    assert(implicitly[Foo[Int]].value) // fooDefault
   |                               ^
   |ambiguous implicit arguments of type Test.Foo[Int] found for parameter e of method implicitly in object Predef.
   |I found:
   |
   |    Test.Foo.fooNotTagged[A](
   |      /* ambiguous: both method amb1 in object NotGiven and method amb2 in object NotGiven match type util.NotGiven[Test.Tagged[Int]] */
   |        summon[util.NotGiven[Test.Tagged[A]]]
   |    )
   |
   |But both method amb1 in object NotGiven and method amb2 in object NotGiven match type util.NotGiven[Test.Tagged[A]].
1 error found

@bishabosha
Copy link
Member

@amsayk you will also need to change in the compiler references to scala.util.Not, such as here https://github.com/lampepfl/dotty/blob/928e01ad0a49d556e75b71144df8ff4bfca6cf5e/compiler/src/dotty/tools/dotc/core/Definitions.scala#L854

@therealcisse
Copy link
Contributor Author

Thanks @bishabosha

@therealcisse therealcisse force-pushed the feature/rename-Not-to-NotGiven branch from 9c16980 to 820cfd5 Compare November 29, 2020 10:22
@therealcisse therealcisse force-pushed the feature/rename-Not-to-NotGiven branch from 820cfd5 to 29632bc Compare November 29, 2020 10:25
@therealcisse
Copy link
Contributor Author

I think this is ready to go. Can someone take a look ? @bishabosha 👀

@bishabosha
Copy link
Member

bishabosha commented Nov 30, 2020

Im not sure why but it seems the CI is not running your tests, can you make a change to the last commit to change its hash and repush?

@therealcisse
Copy link
Contributor Author

/retest

@therealcisse
Copy link
Contributor Author

@bishabosha done 😊

@smarter
Copy link
Member

smarter commented Dec 9, 2020

Thanks for the PR! Unfortunately it stopped merging cleanly as the syntax for given was changed recently, I've updated it and opened a new PR based on this (I couldn't update this one): #10720

@smarter smarter closed this Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants