Skip to content
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

spec still shows antiquated "val" syntax in for comprehensions #4918

Closed
scabug opened this issue Aug 16, 2011 · 7 comments
Closed

spec still shows antiquated "val" syntax in for comprehensions #4918

scabug opened this issue Aug 16, 2011 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Aug 16, 2011

SLS 6.19 has:

Enumerator ::= ... 'val' Pattern1 '=' Expr

'val' here should be optional, or even omitted. It has not been required by the compiler in many years, and standard style (e.g. in Programming in Scala) is to omit it. My understanding is that it might even be disallowed in the future.

@scabug
Copy link
Author

scabug commented Aug 16, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4918?orig=1
Reporter: @SethTisue

@scabug
Copy link
Author

scabug commented Nov 21, 2011

@soc said:
Hasn't this been fixed a few weeks ago?

https://github.com/scala/scala/tree/d440c79aa65a43ea79596430b8b1b35887b18d86/

@scabug
Copy link
Author

scabug commented Nov 21, 2011

@SethTisue said:
Simon: This is a ticket on the language spec, not on the code. I just checked http://www.scala-lang.org/archives/downloads/distrib/files/nightly/pdfs/ScalaReference.pdf and it isn't fixed yet.

@scabug
Copy link
Author

scabug commented Nov 18, 2012

@soc said:
The pull request is scala/scala-dist#20.

@scabug
Copy link
Author

scabug commented Apr 23, 2013

@SethTisue said:
note that val in for is deprecated as of Scala 2.10 ("warning: val keyword in for comprehension is deprecated")

@scabug
Copy link
Author

scabug commented Oct 15, 2013

@gkossakowski said:
Unassigning and rescheduling to M7 as previous deadline was missed.

@scabug
Copy link
Author

scabug commented Oct 22, 2013

@soc said:
Spec update merged in scala/scala-dist@f818652

@scabug scabug closed this as completed Oct 22, 2013
@scabug scabug added this to the 2.11.0-M7 milestone Apr 7, 2017
eed3si9n added a commit to eed3si9n/scala that referenced this issue Feb 26, 2018
The use of `val` keyword in for comprehension has been deprecated since 2.10.
Ref scala/bug#4918
Ref scala@cda4650.

1. This improves the deprecation warning
2. This also removes it under -Xsource:2.14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants