Skip to content

partial function defined in value class method results in spurious implementation restriction #7571

Description

@scabug

{code}
scala> class Foo(val a: Int) extends AnyVal { def foo = { {case x => x}: PartialFunction[Int, Int]; () }}
:7: error: implementation restriction: nested class is not allowed in value class
This restriction is planned to be removed in subsequent releases.
class Foo(val a: Int) extends AnyVal { def foo = { {case x => x}: PartialFunction[Int, Int]; () }}{code}

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions