Skip to content

Commit e5e8404

Browse files
ringaboutjmgomez
authored andcommitted
clean up isNilConversion for seqs, strings (nim-lang#22057)
1 parent 08ed85f commit e5e8404

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/sigmatch.nim

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,8 +1293,6 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
12931293
result = isSubtype
12941294
else:
12951295
result = isNone
1296-
elif tfNotNil in f.flags and tfNotNil notin a.flags:
1297-
result = isNilConversion
12981296
of tyNil: result = isNone
12991297
else: discard
13001298
of tyOrdinal:
@@ -1392,11 +1390,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
13921390
else: discard
13931391
of tyString:
13941392
case a.kind
1395-
of tyString:
1396-
if tfNotNil in f.flags and tfNotNil notin a.flags:
1397-
result = isNilConversion
1398-
else:
1399-
result = isEqual
1393+
of tyString: result = isEqual
14001394
of tyNil: result = isNone
14011395
else: discard
14021396
of tyCstring:

0 commit comments

Comments
 (0)