File: t8237-default.scala

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 (29 lines) | stat: -rw-r--r-- 964 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// This test case was extracted from `names-defaults-neg.scala`
// It pinpoints an improvement an error message that results from
// a type inference failure
object Test extends App {
  test4(test4$default$1)

  def test4[T[P]](x: T[T[List[T[X forSome { type X }]]]]) = ???
  def test4$default$1[T[P]]: List[Int] = ???
}

/*
OLD:
 no type parameters for method test4: (x: T[T[List[T[X forSome { type X }]]]])Nothing exist so that it can be applied to arguments (List[Int])
 --- because ---
argument expression's type is not compatible with formal parameter type;
 found   : List[Int]
 required: ?T
  test4(test4$default$1)
  ^

NEW:

no type parameters for method test4: (x: T[T[List[T[X forSome { type X }]]]])Nothing exist so that it can be applied to arguments (List[Int])
 --- because ---
argument expression's type is not compatible with formal parameter type;
 found   : List[Int]
 required: ?T[?T[List[?T[X forSome { type X }]]]
  test4(test4$default$1)
*/