aboutsummaryrefslogblamecommitdiff
path: root/tests/neg/autoTuplingTest.scala
blob: 92126ab5dd60f15c6776d2eac3873e68117acbc5 (plain) (tree)
1
2
3
4
5
6
7
8

                             
                        
 
                                                                                 

           
                                                                                                        


                
import language.noAutoTupling

object autoTuplingNeg2 {

  val x = Some(1, 2) // error: too many arguments for method apply: (x: A)Some[A]

  x match {
    case Some(a, b) => a + b // error: wrong number of argument patterns for Some // error: not found: b
    case None =>
  }
}