1
1
-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:33 ------------------------------------------------
2
2
11 | var h = new HKT3_1[FunctorImpl](); // error // error
3
3
| ^
4
- | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any
4
+ | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String ] <: Set[T]] =>> Any
5
5
6
6
Explanation
7
7
===========
8
8
9
9
I tried to show that
10
10
test2.FunctorImpl
11
11
conforms to
12
- [Generic2[T] <: Set[T]] =>> Any
12
+ [Generic2[T <: String ] <: Set[T]] =>> Any
13
13
but the comparison trace ended with `false`:
14
14
15
- ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any
16
- ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring)
17
- ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]]
18
- ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring)
15
+ ==> test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any
16
+ ==> test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any (recurring)
17
+ ==> type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]]
18
+ ==> type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring)
19
19
==> [T <: String] =>> Set[T] <: Iterable
20
20
==> [T <: String] =>> Set[T] <: Iterable (recurring)
21
21
==> type bounds [] <: type bounds [ <: String]
@@ -30,31 +30,31 @@ but the comparison trace ended with `false`:
30
30
<== type bounds [] <: type bounds [ <: String] = false
31
31
<== [T <: String] =>> Set[T] <: Iterable (recurring) = false
32
32
<== [T <: String] =>> Set[T] <: Iterable = false
33
- <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false
34
- <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false
35
- <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) = false
36
- <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any = false
33
+ <== type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false
34
+ <== type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false
35
+ <== test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any (recurring) = false
36
+ <== test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any = false
37
37
38
38
The tests were made under the empty constraint
39
39
40
40
-- [E057] Type Mismatch Error: tests/neg-custom-args/i11637.scala:11:21 ------------------------------------------------
41
41
11 | var h = new HKT3_1[FunctorImpl](); // error // error
42
42
| ^
43
- | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T] <: Set[T]] =>> Any
43
+ | Type argument test2.FunctorImpl does not conform to upper bound [Generic2[T <: String ] <: Set[T]] =>> Any
44
44
45
45
Explanation
46
46
===========
47
47
48
48
I tried to show that
49
49
test2.FunctorImpl
50
50
conforms to
51
- [Generic2[T] <: Set[T]] =>> Any
51
+ [Generic2[T <: String ] <: Set[T]] =>> Any
52
52
but the comparison trace ended with `false`:
53
53
54
- ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any
55
- ==> test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring)
56
- ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]]
57
- ==> type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring)
54
+ ==> test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any
55
+ ==> test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any (recurring)
56
+ ==> type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]]
57
+ ==> type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring)
58
58
==> [T <: String] =>> Set[T] <: Iterable
59
59
==> [T <: String] =>> Set[T] <: Iterable (recurring)
60
60
==> type bounds [] <: type bounds [ <: String]
@@ -69,9 +69,9 @@ but the comparison trace ended with `false`:
69
69
<== type bounds [] <: type bounds [ <: String] = false
70
70
<== [T <: String] =>> Set[T] <: Iterable (recurring) = false
71
71
<== [T <: String] =>> Set[T] <: Iterable = false
72
- <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false
73
- <== type bounds [[T] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false
74
- <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any (recurring) = false
75
- <== test2.FunctorImpl <: [Generic2[T] <: Set[T]] =>> Any = false
72
+ <== type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] (recurring) = false
73
+ <== type bounds [[T <: String ] <: Set[T]] <: type bounds [[T] <: Iterable[T]] = false
74
+ <== test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any (recurring) = false
75
+ <== test2.FunctorImpl <: [Generic2[T <: String ] <: Set[T]] =>> Any = false
76
76
77
77
The tests were made under the empty constraint
0 commit comments