Skip to content

False positive of "Unreachable case" warning under macro type match #18506

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

Closed
soronpo opened this issue Sep 3, 2023 · 1 comment
Closed

False positive of "Unreachable case" warning under macro type match #18506

soronpo opened this issue Sep 3, 2023 · 1 comment
Assignees

Comments

@soronpo
Copy link
Contributor

soronpo commented Sep 3, 2023

Compiler version

Last good release: 3.3.1-RC1-bin-20230301-0df5ae2-NIGHTLY
First bad release: 3.3.1-RC1-bin-20230302-8020c77-NIGHTLY
First bad commit: 6b36cd9

Minimized code

//> using options -Xfatal-warnings
import scala.quoted.*

trait DFValOf[T]

def calcWidth(x: List[Type[Any]])(using Quotes): Unit =
  x.collect { case '[DFValOf[t]] => ???}

Output

7 |  x.collect { case '[DFValOf[t]] => ???}
  |                   ^^^^^^^^^^^^^
  |                   Unreachable case

Expectation

No warning (no error under fatal-warnings).

@soronpo soronpo added itype:bug area:pattern-matching regression This worked in a previous version but doesn't anymore area:metaprogramming:quotes Issues related to quotes and splices labels Sep 3, 2023
@soronpo
Copy link
Contributor Author

soronpo commented Sep 3, 2023

Accidental duplication of #18507 (some kind of weird GH glitch)

@soronpo soronpo closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2023
@soronpo soronpo added stat:duplicate and removed itype:bug area:pattern-matching regression This worked in a previous version but doesn't anymore area:metaprogramming:quotes Issues related to quotes and splices labels Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants