Skip to content

Erased terms can't be passed to erased lambda argument #6009

Closed
@Odomontois

Description

@Odomontois
def foo(f: (erased Int) => Int): Int = {
  erased val ctx = 1
  f(ctx)
}

gives compilation error

value ctx is declared as erased, but is in fact used

dotty version : 0.13-RC1

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