Skip to content

Commit ed6f8f1

Browse files
committed
Fix comparison of char and const char* in overloading
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 0e0513f commit ed6f8f1

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Generator/Passes/CheckDuplicatedNamesPass.cs

+2-6
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,9 @@ public bool Equals(Parameter x, Parameter y)
123123
if (CheckForSpecializations(leftPointee, rightPointee))
124124
return true;
125125

126-
if (leftPointee != null && rightPointee != null &&
126+
return leftPointee != null && rightPointee != null &&
127127
leftPointee.GetMappedType(TypeMaps, GeneratorKind).Equals(
128-
rightPointee.GetMappedType(TypeMaps, GeneratorKind)))
129-
return true;
130-
131-
return (leftPointee != null && leftPointee.Desugar(false).Equals(right)) ||
132-
(rightPointee != null && rightPointee.Desugar(false).Equals(left));
128+
rightPointee.GetMappedType(TypeMaps, GeneratorKind));
133129
}
134130

135131
private static bool CheckForSpecializations(Type leftPointee, Type rightPointee)

tests/Common/Common.Tests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public void TestProperties()
528528
Assert.That(prop.StartWithVerb, Is.EqualTo(25));
529529
prop.StartWithVerb = 5;
530530

531-
Assert.That(prop.Contains('a'), Is.EqualTo(prop.Contains1("a")));
531+
Assert.That(prop.Contains('a'), Is.EqualTo(prop.Contains("a")));
532532
}
533533
using (var prop = new HasOverridenSetter())
534534
{

0 commit comments

Comments
 (0)