File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -339,22 +339,6 @@ namespace {
339
339
340
340
expr->walk (LinkedExprAnalyzer (lti, CS));
341
341
342
- auto mergeTypeVariables = [&](ArrayRef<TypeVariableType *> typeVars) {
343
- if (typeVars.size () < 2 )
344
- return ;
345
-
346
- auto rep1 = CS.getRepresentative (typeVars.front ());
347
- for (unsigned i = 1 , n = typeVars.size (); i != n; ++i) {
348
- auto rep2 = CS.getRepresentative (typeVars[i]);
349
- if (rep1 != rep2)
350
- CS.mergeEquivalenceClasses (rep1, rep2, /* updateWorkList*/ false );
351
- }
352
- };
353
-
354
- mergeTypeVariables (lti.intLiteralTyvars );
355
- mergeTypeVariables (lti.floatLiteralTyvars );
356
- mergeTypeVariables (lti.stringLiteralTyvars );
357
-
358
342
if (lti.collectedTypes .size () == 1 ) {
359
343
// TODO: Compute the BCT.
360
344
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ func isString(_ s: inout String) {}
8
8
func test_UnicodeScalarDoesNotImplementArithmetic( _ us: UnicodeScalar , i: Int ) {
9
9
var a1 = " a " + " b " // OK
10
10
isString ( & a1)
11
- let a2 = " a " - " b " // expected-error {{binary operator '-' cannot be applied to two 'String' operands}}
12
- let a3 = " a " * " b " // expected-error {{binary operator '*' cannot be applied to two 'String' operands}}
13
- let a4 = " a " / " b " // expected-error {{binary operator '/' cannot be applied to two 'String' operands}}
11
+ let a2 = " a " - " b " // expected-error {{binary operator '-' cannot be applied to two 'String' operands}} expected-note {{}}
12
+ let a3 = " a " * " b " // expected-error {{binary operator '*' cannot be applied to two 'String' operands}} expected-note {{}}
13
+ let a4 = " a " / " b " // expected-error {{binary operator '/' cannot be applied to two 'String' operands}} expected-note {{}}
14
14
15
15
let b1 = us + us // expected-error {{binary operator '+' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
16
16
let b2 = us - us // expected-error {{binary operator '-' cannot be applied to two 'UnicodeScalar' (aka 'Unicode.Scalar') operands}}
You can’t perform that action at this time.
0 commit comments