Skip to content

Conversation

robstoll
Copy link
Contributor

Note that the used syntax in the second example actually does not work (I have left a TODO)

@robstoll
Copy link
Contributor Author

robstoll commented Feb 28, 2020

I realised that given new Table doesn't compile. Intentionally?

@robstoll
Copy link
Contributor Author

I guess I misinterpreted the syntax and given T is actually a special shorthand for given T = new T() and not a creator application. Likewise class A(i : Int); given A(1) is short for given A = new A(1) correct?

if so then I have to update this PR and in this case I would suggest that it is mentioned in http://dotty.epfl.ch/docs/reference/contextual/givens.html

I would do the necessary with an additional commit.

Thoughts?

@odersky odersky self-assigned this Mar 23, 2020
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, this is great!

@robstoll
Copy link
Contributor Author

@odersky I removed the TODO as the syntax which previously did not work in scastie compiles perfectly fine in master (and now also on scastie):
6593929

@smarter smarter merged commit a0e5a8e into scala:master Mar 30, 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