diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-06-09 20:47:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-09 14:47:52 +0200 |
commit | 49e11d9dcc00d4c758b754e7a89f9d0253d25ea0 (patch) | |
tree | f08c83152d17c53ebdfa16b579096ed9dc4fa6fd | |
parent | 18462b1026b2411cf7bc10c4bf6c4ab3eb7219bc (diff) | |
download | Nim-49e11d9dcc00d4c758b754e7a89f9d0253d25ea0.tar.gz |
clean up isNilConversion for seqs, strings (#22057)
-rw-r--r-- | compiler/sigmatch.nim | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 8f396840e..c3d524791 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1293,8 +1293,6 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, result = isSubtype else: result = isNone - elif tfNotNil in f.flags and tfNotNil notin a.flags: - result = isNilConversion of tyNil: result = isNone else: discard of tyOrdinal: @@ -1392,11 +1390,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, else: discard of tyString: case a.kind - of tyString: - if tfNotNil in f.flags and tfNotNil notin a.flags: - result = isNilConversion - else: - result = isEqual + of tyString: result = isEqual of tyNil: result = isNone else: discard of tyCstring: |