package hfd.test32 //匹配 变量的类型 object Test34_4 {def main(args: Array[String]): Unit = {val i=1val j:Double=1.2val b:Boolean=falseval x:Any=bx match {case _:Int=>println(s"当前是Int")case _:Double=>println(s"当前是Double")case a:Boolean=>println(s"当前是Boolean $a")case _=>println("其他")}} }