natsfr

public var error

Aug 3rd, 2017
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.37 KB | None | 0 0
  1. class MyClass {
  2.     ....
  3.     var polySeq = Seq[MyType]_
  4.     ....
  5.     def MyMethod(...) = {
  6.         ....
  7.         polySeq = for (e <- coefs.zipWithIndex) yield { new MyType(e._1, e._2) }
  8.         ....
  9.     }
  10. }
  11.  
  12. Error: type mismatch;
  13.  found   : scala.collection.immutable.IndexedSeq[MyType]
  14.  required: Seq[MyType] => Seq[MyType]
  15.     polySeq = for (e <- coefs.zipWithIndex) yield { new MyType(e._1, e._2) }
Advertisement