-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PatDef desugaring problem #1773
New issue
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
Comments
Akaik quasiqote desugaring in scalac relies on non-specified details of
desugaring.
…On 5 December 2016 09:28:00 liu fengyun ***@***.***> wrote:
Following code compiles fine in scalac but failed to compile in dotty. The
cause is mostly like to be unmatched cases when desugaring patdef, as in
#1748 .
```Scala
object Test {
implicit class Foo(sc: StringContext) {
object q {
def unapply(arg: Any): Option[(Any, Any)] =
Some((sc.parts(0), sc.parts(1)))
}
}
def main(args: Array[String]): Unit = {
val q"class ${name: String} extends ${parent: String}" = new Object
println(name)
println(parent)
}
}
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1773
|
Cc @densh
…On 5 December 2016 09:28:00 liu fengyun ***@***.***> wrote:
Following code compiles fine in scalac but failed to compile in dotty. The
cause is mostly like to be unmatched cases when desugaring patdef, as in
#1748 .
```Scala
object Test {
implicit class Foo(sc: StringContext) {
object q {
def unapply(arg: Any): Option[(Any, Any)] =
Some((sc.parts(0), sc.parts(1)))
}
}
def main(args: Array[String]): Unit = {
val q"class ${name: String} extends ${parent: String}" = new Object
println(name)
println(parent)
}
}
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1773
|
@DarkDimius it seems that adding a case for |
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 7, 2016
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 7, 2016
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 8, 2016
liufengyun
added a commit
that referenced
this issue
Dec 8, 2016
Fix #1773: handle patterns in interpolated string
@liufengyun What's the problem with RefChecks that you were referring to in the last comment? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following code compiles fine in scalac but failed to compile in dotty. The cause is mostly like to be unmatched cases when desugaring patdef, as in #1748 .
The text was updated successfully, but these errors were encountered: