Skip to content

Quoted pattern should devirtualize member selections #10573

Closed
@nicolasstucki

Description

@nicolasstucki

The semantics still seem incomplete in this implementation.

Consider:

trait A { def foo: Int }
trait B extends A { def foo: Int = 1 }

val e0: Expr[A] = '{ new B }
val e1: Expr[Int] = '{ $e0.foo }

The quoted expression e1 will not match a pattern like '{ ($x: B).foo }, but it should.

Originally posted by @LPTK in #10531 (comment)

Metadata

Metadata

Assignees

No one assigned

    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