Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 30, 2019

Three syntax changes:

  1. Use given instead of with for implicit parameters and arguments.
  2. Write given A => B instead of A |=> B for implicit function types
  3. Write given x => e instead of x |=> e for implicit closuress.
@ghost ghost assigned odersky Jan 30, 2019
@ghost ghost added the review label Jan 30, 2019
@Blaisorblade
Copy link
Contributor

On master there's some code using the new with to update (from f079dd3).

The build failure can be reproduced most quickly by rebasing on master and running dotty-bootstrapped/testCompilation tasty-interpreter.

@biboudis
Copy link
Contributor

biboudis commented Jan 30, 2019

Hmm, it reports a syntax error also triggered by:

language-server/test/dotty/tools/languageserver/util/CodeTester.scala

Previously, `given ()` was legal, but it serves no purpose and only complicates things.
Parser.syntaxError contains a tweak that underlines the whole span of the current token, if it has a name. Tho make this work reliably we need to reset the name to null when reading a new token, since not every token sets a name.
It's `given A => B` instead of `A |=> B`.
# Conflicts: #	tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala #	tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala
@odersky
Copy link
Contributor Author

odersky commented Jan 31, 2019

Superseded by #5825

@odersky odersky closed this Jan 31, 2019
@ghost ghost removed the stat:needs review label Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants