-
-
Save kmizu/0907857f82b39755bb0d6707c1baba0b to your computer and use it in GitHub Desktop.
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
scalaVersion := "2.11.8" |
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
package com.example | |
case class Foo[M[_], A](step: M[Foo.Step[A, Foo[M, A]]]) | |
object Foo { | |
class Step[A, S] | |
object Done { | |
def unapply[A, S](a: Step[A, S]): Boolean = true | |
} | |
} | |
object ClassFormatErrorBug { | |
implicit class AnyOps[A](actual: A) { | |
def mustMatch(f: PartialFunction[A, Boolean]): Unit = { | |
} | |
} | |
type Id[+A] = A | |
def main(args: Array[String]): Unit = { | |
val s = new Foo[Id, String](new Foo.Step[String, Foo[Id, String]]) | |
s.step mustMatch { | |
case Foo.Done() => true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment