Skip to content
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

SI-12499 performance regression in patmat. #10168

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/compiler/scala/tools/nsc/transform/patmat/Logic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ trait Logic extends Debugging {
def apply(ps: Prop*) = create(ps)
def create(ps: Iterable[Prop]) = ps match {
case ps: Set[Prop] => new And(ps)
case _ => new And(ps.to(scala.collection.immutable.ListSet))
case _ => new And(ps.to(scala.collection.immutable.Set))
}
}

Expand All @@ -129,7 +129,7 @@ trait Logic extends Debugging {
def apply(ps: Prop*) = create(ps)
def create(ps: Iterable[Prop]) = ps match {
case ps: Set[Prop] => new Or(ps)
case _ => new Or(ps.to(scala.collection.immutable.ListSet))
case _ => new Or(ps.to(scala.collection.immutable.Set))
}
}

Expand Down
8 changes: 8 additions & 0 deletions test/files/neg/t12499.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
t12499.scala:455: warning: Cannot check match for unreachability.
The analysis required more space than allowed.
Please try with scalac -Ypatmat-exhaust-depth 60 or -Ypatmat-exhaust-depth off.
implicit val converter: Thing[Phantom.TypeA] => String = {
^
error: No warnings can be incurred under -Werror.
1 warning
1 error
Loading