-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Short-circuit isCheckable with classSymbol
A mutually recursive, and ever-growing type pair like ExprMap and EM (in the test case) would blow up isCheckable. Let's use the classSymbol instead. [Cherry-picked eff3424]
- Loading branch information
1 parent
f5d9cce
commit 282a621
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// minimised from github.com/Adam-Vandervorst/CZ2 | ||
|
||
import scala.collection.mutable | ||
|
||
private trait EMImpl[V, F[_]] | ||
|
||
case class EM[V2](apps: ExprMap[ExprMap[V2]]) extends EMImpl[V2, EM]: | ||
def collect[W](pf: PartialFunction[V2, W]): Unit = | ||
val apps1 = apps.collect(_.collect(pf)) | ||
|
||
case class ExprMap[V](var em: EM[V] = null) extends EMImpl[V, ExprMap]: | ||
def collect[W](pf: PartialFunction[V, W]): ExprMap[W] = ??? // was: StackOverflow in isCheckable |