Skip to content

-language flag enables experimental features in release REPL #13514

Open
@bishabosha

Description

@bishabosha

Compiler version

3.0.2

Minimized code

$ scala -language:experimental.fewerBraces
Experimental feature experimental.fewerBraces may only be used with a nightly or snapshot version of the compiler

Output

I can now freely use the fewerBraces feature:

scala> List(1,2,3).map:                                                                                                 
     |   x => x + 1
     | 
val res0: List[Int] = List(2, 3, 4)

Expectation

I would get without the flag:

scala> List(1,2,3).map:                                                                                                 
     |   x => x + 1
-- Error:
2 |  x => x + 1
  |    ^
  |parentheses are required around the parameter of a lambda
  |This construct can be rewritten automatically under -rewrite -source 3.0-migration.
-- Error:
1 |List(1,2,3).map:
  |^
  |not a legal formal parameter
2 |  x => x + 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions