@@ -55,7 +55,7 @@ Ternary expression type inference with different types
5555========================================================================
5656fun main(cond: bool) {
5757 val b = cond ? 10 : "hello";
58- //! ^ int | slice
58+ //! ^ int | string
5959}
6060------------------------------------------------------------------------
6161ok
@@ -227,7 +227,7 @@ String literal type inference
227227========================================================================
228228fun main() {
229229 val data = "hello";
230- //! ^ slice
230+ //! ^ string
231231}
232232------------------------------------------------------------------------
233233ok
@@ -270,7 +270,7 @@ Tuple literal type inference
270270========================================================================
271271fun main() {
272272 val data = [1, true, "hello"];
273- //! ^ [int, bool, slice ]
273+ //! ^ [int, bool, string ]
274274}
275275------------------------------------------------------------------------
276276ok
@@ -280,7 +280,7 @@ Tensor literal type inference
280280========================================================================
281281fun main() {
282282 val data = (1, true, "hello");
283- //! ^ (int, bool, slice )
283+ //! ^ (int, bool, string )
284284}
285285------------------------------------------------------------------------
286286ok
@@ -290,7 +290,7 @@ Complex tensor literal type inference
290290========================================================================
291291fun main() {
292292 val data = (1, [1, [1, true, "hello"], (1, [1, [1, true, "hello"], "hello"], "hello")], "hello");
293- //! ^ (int, [int, [int, bool, slice ], (int, [int, [int, bool, slice ], slice ], slice )], slice )
293+ //! ^ (int, [int, [int, bool, string ], (int, [int, [int, bool, string ], string ], string )], string )
294294}
295295------------------------------------------------------------------------
296296ok
0 commit comments