|
20 | 20 |
|
21 | 21 | x: Supports[Some[int]] = [1, 2, 3]
|
22 | 22 | y = {1, 2, 3}
|
23 |
| - reveal_type(some(x)) # N: Revealed type is "builtins.int*" |
24 |
| - reveal_type(some(y)) # N: Revealed type is "builtins.int*" |
| 23 | + reveal_type(some(x)) # N: Revealed type is "builtins.int" |
| 24 | + reveal_type(some(y)) # N: Revealed type is "builtins.int" |
25 | 25 |
|
26 | 26 |
|
27 | 27 | - case: supports_generic_correct2
|
|
47 | 47 |
|
48 | 48 | x: Supports[Some[int, str]] = {1: 'a'}
|
49 | 49 |
|
50 |
| - reveal_type(some(x, 1, 'a')) # N: Revealed type is "builtins.str*" |
51 |
| - reveal_type(some({'a': 1}, 'a', 1)) # N: Revealed type is "builtins.int*" |
| 50 | + reveal_type(some(x, 1, 'a')) # N: Revealed type is "builtins.str" |
| 51 | + reveal_type(some({'a': 1}, 'a', 1)) # N: Revealed type is "builtins.int" |
52 | 52 |
|
53 | 53 |
|
54 | 54 | - case: supports_generic_wrong1
|
|
73 | 73 | x: Supports[Some[int]] = {1, 2, 3}
|
74 | 74 | some({1, 2, 3})
|
75 | 75 | out: |
|
76 |
| - main:17: error: Incompatible types in assignment (expression has type "Set[int]", variable has type "Supports[Some[int]]") |
77 |
| - main:18: error: Argument 1 to "some" has incompatible type "Set[int]"; expected "Supports[Some[<nothing>]]" |
| 76 | + main:17: error: Incompatible types in assignment (expression has type "Set[int]", variable has type "Supports[Some[int]]") [assignment] |
| 77 | + main:18: error: Argument 1 to "some" has incompatible type "Set[int]"; expected "Supports[Some[<nothing>]]" [arg-type] |
78 | 78 |
|
79 | 79 |
|
80 | 80 | - case: supports_generic_wrong2
|
|
105 | 105 | y: Supports[Some[int]] = {1, 2, 3}
|
106 | 106 | z: Supports[Some[int]] = 1
|
107 | 107 | out: |
|
108 |
| - main:17: error: Found different typeclass ".instance" calls, use only "main.some" |
109 |
| - main:17: error: Instance "Union[builtins.list[X`-1], builtins.set[X`-1]]" does not match inferred type "builtins.set[_T`1]" |
110 |
| - main:22: error: Incompatible types in assignment (expression has type "List[int]", variable has type "Supports[Some[int]]") |
111 |
| - main:23: error: Incompatible types in assignment (expression has type "Set[int]", variable has type "Supports[Some[int]]") |
112 |
| - main:24: error: Incompatible types in assignment (expression has type "int", variable has type "Supports[Some[int]]") |
| 108 | + main:17: error: Found different typeclass ".instance" calls, use only "main.some" [misc] |
| 109 | + main:17: error: Instance "Union[builtins.list[X`-1], builtins.set[X`-1]]" does not match inferred type "builtins.set[_T`1]" [misc] |
| 110 | + main:22: error: Incompatible types in assignment (expression has type "List[int]", variable has type "Supports[Some[int]]") [assignment] |
| 111 | + main:23: error: Incompatible types in assignment (expression has type "Set[int]", variable has type "Supports[Some[int]]") [assignment] |
| 112 | + main:24: error: Incompatible types in assignment (expression has type "int", variable has type "Supports[Some[int]]") [assignment] |
113 | 113 |
|
114 | 114 |
|
115 | 115 | - case: supports_multiple_one_generic_one_regular
|
|
177 | 177 | ...
|
178 | 178 |
|
179 | 179 | a: Supports[Some[str], Other[int]]
|
180 |
| - reveal_type(some(a)) # N: Revealed type is "builtins.str*" |
181 |
| - reveal_type(other(a)) # N: Revealed type is "builtins.int*" |
| 180 | + reveal_type(some(a)) # N: Revealed type is "builtins.str" |
| 181 | + reveal_type(other(a)) # N: Revealed type is "builtins.int" |
0 commit comments