Skip to content

Language deviation\bug: can't pass {} as a lambda #645

Closed
@DarkDimius

Description

@DarkDimius
[info] % dotc amp.scala
[info]
[info] compiling /Users/dark/workspace/dotty/tests/partest-generated/run/amp.scala
[info] options: -pagewidth 160 -Yno-deep-subtypes -Yno-double-bindings -Ycheck:tailrec,resolveSuper,mixin,restoreScopes -d ./tests/partest-generated/run/amp-run.obj
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/amp.scala:19: error: method bar in object Test$ does not take more parameters
[info]   Console.println((bar{ Console.println("g called"); 42 })())
[info]                   ^
[info] /Users/dark/workspace/dotty/tests/partest-generated/run/amp.scala:20: error: method foo in object Test$ does not take more parameters
[info]   Console.println(foo()())

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions