Guest User

Untitled

a guest
Nov 19th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. scala> collection.mutable.Buffer[Tuple2[Int, Int]]() += (1, 2)
  2. <console>:8: error: type mismatch;
  3. found : Int(1)
  4. required: (Int, Int)
  5. collection.mutable.Buffer[Tuple2[Int, Int]]() += (1, 2)
  6. ^
  7.  
  8. scala> collection.mutable.Buffer[Tuple2[Int, Int]]() += ((1, 2))
  9. res2: scala.collection.mutable.Buffer[(Int, Int)] = ArrayBuffer((1,2))
  10.  
  11. scala> Seq[Tuple2[Int, Int]]() :+ (1, 2)
  12. res3: Seq[(Int, Int)] = List((1,2))
Add Comment
Please, Sign In to add comment