Exhaustive match for union type

Hi, I work on decreasing the generated byte code, so I try to replace simple enum with union type. But despite TypeTest addition matches are not exhaustive. Could you help me?

enum U:
  case S(s: String)
  case I(i: Int)
type U = S | I

object U {

  opaque type S = String
  opaque type I = I

  object S:
    inline def apply(inline s: S): S = s

    inline def unapply(inline s: S): Some[String] = Some(s)

    given TypeTest[Any, S] with
      def unapply(x: Any): Option[S & x.type] = x match
        case s: String => Some(s.asInstanceOf[S & x.type])
        case _ => None

  object I:
    inline def apply(inline i: I): I = i

    inline def unapply(inline i: I): Some[Int] = Some(i)

    given TypeTest[Any, I] with
      def unapply(x: Any): Option[I & x.type] = x match
        case i: I => Some(p.asInstanceOf[I & x.type])
        case _ => None
x match
    case _: S =>
    case _: I =>
 x match
|  ^
|match may not be exhaustive.
|
|It would fail on pattern case: _: S, _: I

It compiles, have I missed something?

import FPIntro.Match4UnionTypes.U.{I, S}

import scala.reflect.TypeTest

//Exhaustive match for union type
object Match4UnionTypes:
enum U:
case S(s: String)
case I(i: Int)

type UnionSI = S | I

object UnionSI {

opaque type uS = String
opaque type uI = I

object uS:
  inline def apply(inline s: uS): uS = s

  inline def unapply(inline s: uS): Some[String] = Some(s)

  given TypeTest[Any, uS] with
    def unapply(x: Any): Option[uS & x.type] = x match
      case s: String => Some(s.asInstanceOf[uS & x.type])
      case _         => None

object uI:
  inline def apply(inline i: uI): uI = i

  inline def unapply(inline i: uI): Some[Int] = Some(i.i)

  given TypeTest[Any, I] with
    def unapply(x: Any): Option[uI & x.type] = x match
      case i: uI => Some(i.asInstanceOf[uI & x.type])
      case s: uS    => None

}