You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:35:5: Error: The static type of the explicit instantiation operand must be a non-null generic function type but is 'void Function<T>()?'.
38
+
// Try changing the operand or remove the type arguments.
39
+
// f1<int>; // error
40
+
// ^
41
+
//
37
42
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:36:4: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'.
38
43
// Try changing the operand or remove the type arguments.
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:61:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class?'.
80
+
// - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
81
+
// Try changing the operand or remove the type arguments.
82
+
// var topLevel3 = c2<int>; // error
83
+
// ^
84
+
//
85
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:62:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'GetterCall'.
86
+
// - 'GetterCall' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
87
+
// Try changing the operand or remove the type arguments.
88
+
// var topLevel4 = c3<int>; // error
89
+
// ^
90
+
//
91
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:63:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'int?'.
92
+
// Try changing the operand or remove the type arguments.
93
+
// var topLevel5 = i2<int>; // error
94
+
// ^
95
+
//
96
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:64:19: Error: The static type of the explicit instantiation operand must be a non-null generic function type but is 'void Function<T>()?'.
97
+
// Try changing the operand or remove the type arguments.
98
+
// var topLevel6 = f1<int>; // error
99
+
// ^
100
+
//
101
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:65:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'.
102
+
// Try changing the operand or remove the type arguments.
103
+
// var topLevel7 = n<int>; // error
104
+
// ^
105
+
//
106
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:66:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
107
+
// Try changing the operand or remove the type arguments.
108
+
// var topLevel8 = d<int>; // error
109
+
// ^
110
+
//
111
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:67:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String'.
112
+
// Try changing the operand or remove the type arguments.
113
+
// var topLevel9 = a<int>; // error
114
+
// ^
115
+
//
116
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:68:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'double'.
117
+
// Try changing the operand or remove the type arguments.
118
+
// var topLevel10 = b<int>; // error
119
+
// ^
120
+
//
121
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:69:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'bool'.
122
+
// Try changing the operand or remove the type arguments.
123
+
// var topLevel11 = c<int>; // error
124
+
// ^
125
+
//
126
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:70:20: Error: The static type of the explicit instantiation operand must be a generic function type but is 'FutureOr<Class>'.
127
+
// - 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
128
+
// Try changing the operand or remove the type arguments.
129
+
// var topLevel12 = f2<int>; // error
130
+
// ^
131
+
//
132
+
// pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:71:20: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
133
+
// - 'Function' is from 'dart:core'.
134
+
// Try changing the operand or remove the type arguments.
135
+
// var topLevel13 = f3<int>; // error
136
+
// ^
137
+
//
74
138
import self as self;
75
139
import "dart:core" as core;
76
140
@@ -107,6 +171,69 @@ extension Ambiguous2 on core::String {
107
171
method call = self::Ambiguous2|call;
108
172
tearoff call = self::Ambiguous2|get#call;
109
173
}
174
+
static field self::Class c1 = new self::Class::•();
175
+
static field self::Class? c2;
176
+
static field self::GetterCall c3 = new self::GetterCall::•();
177
+
static field core::int i1 = 0;
178
+
static field core::int? i2 = null;
179
+
static field <T extends core::Object? = dynamic>() →? void f1 = null;
180
+
static field Never n = throw "";
181
+
static field dynamic d = null;
182
+
static field core::String a = "";
183
+
static field core::double b = 0.5;
184
+
static field core::bool c = true;
185
+
static field FutureOr<self::Class>f2 = new self::Class::•();
static field () → dynamic topLevel2 = self::Extension|get#call(self::i1)<core::int>;
189
+
static field invalid-type topLevel3 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:61:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Class?'.
190
+
- 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
191
+
Try changing the operand or remove the type arguments.
192
+
var topLevel3 = c2<int>; // error
193
+
^";
194
+
static field invalid-type topLevel4 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:62:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'GetterCall'.
195
+
- 'GetterCall' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
196
+
Try changing the operand or remove the type arguments.
197
+
var topLevel4 = c3<int>; // error
198
+
^";
199
+
static field invalid-type topLevel5 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:63:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'int?'.
200
+
Try changing the operand or remove the type arguments.
201
+
var topLevel5 = i2<int>; // error
202
+
^";
203
+
static field invalid-type topLevel6 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:64:19: Error: The static type of the explicit instantiation operand must be a non-null generic function type but is 'void Function<T>()?'.
204
+
Try changing the operand or remove the type arguments.
205
+
var topLevel6 = f1<int>; // error
206
+
^";
207
+
static field invalid-type topLevel7 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:65:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'.
208
+
Try changing the operand or remove the type arguments.
209
+
var topLevel7 = n<int>; // error
210
+
^";
211
+
static field invalid-type topLevel8 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:66:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'.
212
+
Try changing the operand or remove the type arguments.
213
+
var topLevel8 = d<int>; // error
214
+
^";
215
+
static field invalid-type topLevel9 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:67:18: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String'.
216
+
Try changing the operand or remove the type arguments.
217
+
var topLevel9 = a<int>; // error
218
+
^";
219
+
static field invalid-type topLevel10 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:68:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'double'.
220
+
Try changing the operand or remove the type arguments.
221
+
var topLevel10 = b<int>; // error
222
+
^";
223
+
static field invalid-type topLevel11 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:69:19: Error: The static type of the explicit instantiation operand must be a generic function type but is 'bool'.
224
+
Try changing the operand or remove the type arguments.
225
+
var topLevel11 = c<int>; // error
226
+
^";
227
+
static field invalid-type topLevel12 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:70:20: Error: The static type of the explicit instantiation operand must be a generic function type but is 'FutureOr<Class>'.
228
+
- 'Class' is from 'pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart'.
229
+
Try changing the operand or remove the type arguments.
230
+
var topLevel12 = f2<int>; // error
231
+
^";
232
+
static field invalid-type topLevel13 = invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:71:20: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Function'.
233
+
- 'Function' is from 'dart:core'.
234
+
Try changing the operand or remove the type arguments.
235
+
var topLevel13 = f3<int>; // error
236
+
^";
110
237
static method method<T extends self::Class, S extends core::int>(self::Class c, core::int i, self::method::T t, self::method::S s) → dynamic {
@@ -140,7 +267,10 @@ Try changing the operand or remove the type arguments.
140
267
Try changing the operand or remove the type arguments.
141
268
s<int>; // error
142
269
^";
143
-
f1<core::int>;
270
+
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:35:5: Error: The static type of the explicit instantiation operand must be a non-null generic function type but is 'void Function<T>()?'.
271
+
Try changing the operand or remove the type arguments.
272
+
f1<int>; // error
273
+
^";
144
274
invalid-expression "pkg/front_end/testcases/constructor_tearoffs/callable_instantiation.dart:36:4: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'.
145
275
Try changing the operand or remove the type arguments.
0 commit comments