source: tests/collections/.expect/string-operator-ERR16.txt@ a0b7ef5

Last change on this file since a0b7ef5 was 570e7ad, checked in by Michael Brooks <mlbrooks@…>, 13 months ago

Make string operator-overload costs match their intuitively equivalent arithmetics.

Replace many by-reference string args with by-value args to work around noise from the reference-cost column.

Use a special arithmetic type for the factor argument of ?*? to match conversion cost of (char*int=int).

Removes cost-function noise of char-arithmetic operators being preferred over their string-concatenation equivalents in the reference-cost column.

Notably, all former Spanish-A and numeric outputs have become ambiguous or been associated with a reproducible bug.

  • Property mode set to 100644
File size: 3.9 KB
Line 
1collections/string-operator.cfa:318:1 error: Cannot choose between 2 alternatives for expression
2Applying untyped:
3 Name: printf
4...to:
5 Constant Expression ("%d\n": array of char with dimension of Constant Expression (4: unsigned long int)
6 ... with resolved type:
7 unsigned long int)
8 ... with resolved type:
9 array of char with dimension of Constant Expression (4: unsigned long int)
10 ... with resolved type:
11 unsigned long int
12 Applying untyped:
13 Name: ?*?
14 ...to:
15 Constant Expression ('a': char)
16 ... with resolved type:
17 char
18 Constant Expression (3: signed int)
19 ... with resolved type:
20 signed int
21
22 Alternatives are:
23Cost ( 1, 0, 0, 3, 0, 0, 0, 0 ): Application of
24 Variable Expression: printf: extern function
25 ... with parameters
26 restrict pointer to const char
27 and a variable number of other arguments
28 ... returning
29 signed int
30
31 ... with resolved type:
32 pointer to function
33 ... with parameters
34 restrict pointer to const char
35 and a variable number of other arguments
36 ... returning
37 signed int
38
39 ... to arguments
40 Generated Cast of:
41 Constant Expression ("%d\n": pointer to char)
42 ... with resolved type:
43 pointer to char
44 ... to:
45 restrict pointer to const char
46 ... with resolved type:
47 restrict pointer to const char
48 Application of
49 Variable Expression: ?*?: function
50 ... with parameters
51 char
52 signed long long int
53 ... returning
54 instance of struct string with body
55
56 ... with resolved type:
57 pointer to function
58 ... with parameters
59 char
60 signed long long int
61 ... returning
62 instance of struct string with body
63
64 ... to arguments
65 Constant Expression ('a': char)
66 ... with resolved type:
67 char
68 Generated Cast of:
69 Constant Expression (3: signed int)
70 ... with resolved type:
71 signed int
72 ... to:
73 signed long long int
74 ... with resolved type:
75 signed long long int
76
77 ... with resolved type:
78 instance of struct string with body
79
80 ... with resolved type:
81 signed int
82 (types:
83 signed int
84 )
85 Environment:
86
87Cost ( 1, 0, 0, 3, 0, 0, 0, 0 ): Application of
88 Variable Expression: printf: extern function
89 ... with parameters
90 restrict pointer to const char
91 and a variable number of other arguments
92 ... returning
93 signed int
94
95 ... with resolved type:
96 pointer to function
97 ... with parameters
98 restrict pointer to const char
99 and a variable number of other arguments
100 ... returning
101 signed int
102
103 ... to arguments
104 Generated Cast of:
105 Constant Expression ("%d\n": pointer to char)
106 ... with resolved type:
107 pointer to char
108 ... to:
109 restrict pointer to const char
110 ... with resolved type:
111 restrict pointer to const char
112 Application of
113 Variable Expression: ?*?: function
114 ... with parameters
115 signed int
116 signed int
117 ... returning
118 signed int
119
120 ... with resolved type:
121 pointer to function
122 ... with parameters
123 signed int
124 signed int
125 ... returning
126 signed int
127
128 ... to arguments
129 Generated Cast of:
130 Constant Expression ('a': char)
131 ... with resolved type:
132 char
133 ... to:
134 signed int
135 ... with resolved type:
136 signed int
137 Constant Expression (3: signed int)
138 ... with resolved type:
139 signed int
140
141 ... with resolved type:
142 signed int
143
144 ... with resolved type:
145 signed int
146 (types:
147 signed int
148 )
149 Environment:
150
151
Note: See TracBrowser for help on using the repository browser.