File: type-diagnostics.check

package info (click to toggle)
scala 2.11.12-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 62,924 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,135; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (21 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
type-diagnostics.scala:4: error: type mismatch;
 found   : scala.collection.Set[String]
 required: scala.collection.immutable.Set[String]
  def f = Calculator("Hello", binding.keySet: collection.Set[String])
                                            ^
type-diagnostics.scala:13: error: type mismatch;
 found   : List[a(in method f2)]
 required: List[a(in method f1)]
      y match { case y1: List[a] => f3(x, y1) }
                                          ^
type-diagnostics.scala:17: error: type mismatch;
 found   : String(in method f2)
 required: java.lang.String
  def f2[String](s: String) = strings(List(s))
                                           ^
type-diagnostics.scala:21: error: missing parameter type for expanded function
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type was: ?
  val f = { case 5 => 10 }
          ^
four errors found