We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
e1
'{ ($x: B).foo }
Originally posted by @LPTK in #10531 (comment)
The text was updated successfully, but these errors were encountered:
Test for this issue
import scala.quoted._ trait A { def foo: Int } class B extends A { def foo: Int = 1 } inline def test(): Unit = ${ testExpr() } def testExpr()(using Quotes): Expr[Unit] = { val e0: Expr[A] = '{ new B } val e1: Expr[Int] = '{ $e0.foo } e1 match case '{ ($x: B).foo } => '{} case _ => quotes.reflect.report.throwError("did not match") }
def Test = test()
Sorry, something went wrong.
Fix scala#10573: Devirtualize member selection when matching
069033b
7b15934
96d5073
Merge pull request #10576 from dotty-staging/fix-#10573
d8cb977
Fix #10573: Devirtualize member selection when matching
No branches or pull requests
The semantics still seem incomplete in this implementation.
Consider:
The quoted expression
e1
will not match a pattern like'{ ($x: B).foo }
, but it should.Originally posted by @LPTK in #10531 (comment)
The text was updated successfully, but these errors were encountered: