11discard """
22errormsg: "type mismatch: got <Bar[system.int]>"
3- disabled: "32bit"
43nimout: '''
54t3330.nim(78, 4) Error: type mismatch: got <Bar[system.int]>
65but expected one of:
@@ -9,33 +8,33 @@ proc test(foo: Foo[int])
98 required type for foo: Foo[int]
109 but expression 'bar' is of type: Bar[system.int]
1110t3330.nim(63, 8) Hint: Non-matching candidates for add(k, string, T)
12- proc add(x: var string; y: string)
13- first type mismatch at position: 1
14- required type for x: var string
15- but expression 'k' is of type: Alias
16- proc add[T](x: var seq[T]; y: openArray[T])
11+ proc add(result: var string; x: float)
1712 first type mismatch at position: 1
18- required type for x : var seq[T]
13+ required type for result : var string
1914 but expression 'k' is of type: Alias
20- proc add(result: var string; x: float )
15+ proc add(result: var string; x: int64 )
2116 first type mismatch at position: 1
2217 required type for result: var string
2318 but expression 'k' is of type: Alias
24- proc add[T] (x: var seq[T] ; y: T )
19+ proc add(x: var string ; y: char )
2520 first type mismatch at position: 1
26- required type for x: var seq[T]
21+ required type for x: var string
2722 but expression 'k' is of type: Alias
2823proc add(x: var string; y: cstring)
2924 first type mismatch at position: 1
3025 required type for x: var string
3126 but expression 'k' is of type: Alias
32- proc add(x: var string; y: char )
27+ proc add(x: var string; y: string )
3328 first type mismatch at position: 1
3429 required type for x: var string
3530 but expression 'k' is of type: Alias
36- proc add(result : var string; x: int64 )
31+ proc add[T](x : var seq[T]; y: T )
3732 first type mismatch at position: 1
38- required type for result: var string
33+ required type for x: var seq[T]
34+ but expression 'k' is of type: Alias
35+ proc add[T](x: var seq[T]; y: openArray[T])
36+ first type mismatch at position: 1
37+ required type for x: var seq[T]
3938 but expression 'k' is of type: Alias
4039
4140t3330.nim(63, 8) template/generic instantiation of `add` from here
@@ -46,10 +45,11 @@ t3330.nim(71, 6) Foo: 'bar.x' cannot be assigned to
4645expression: test(bar)'''
4746"""
4847
49- # Note: currently disabled on 32bit because the candidates are presented in
50- # different order on travis with `NIM_COMPILE_TO_CPP=false CPU=i386`;
51- # a possible fix would be to sort the candidates by proc signature or
52- # declaration location
48+
49+
50+
51+
52+
5353
5454
5555
0 commit comments