diff --git a/tests/neg/i8894.scala b/tests/neg/i8894.scala new file mode 100644 index 000000000000..60b6937b3591 --- /dev/null +++ b/tests/neg/i8894.scala @@ -0,0 +1,13 @@ +trait Extractor { + inline def unapplySeq(inline tn: String): Option[Seq[String]] +} + +transparent inline def (inline sc: StringContext).poql: Extractor = new Extractor { + inline def unapplySeq(inline tn: String): Option[Seq[String]] = ??? // error: Implementation restriction: nested inline methods are not supported +} + +object x { + "x" match { + case poql" $x" => x // error: Deferred inline method unapplySeq in trait Extractor cannot be invoked + } +}