diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-05-13 19:24:27 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-05-13 19:24:27 +0200 |
commit | f293e2c152db01291c6a94e3df790af7da1c85fc (patch) | |
tree | 8167c4cc1854b9d2c894e2cec97f337697a62bf8 /compiler/sigmatch.nim | |
parent | 0bf78e262950aeaa97bf3b64e88728a5681fd2e5 (diff) | |
parent | a8fbaf917b854876a01782c644e01ab2e90c5d9f (diff) | |
download | Nim-f293e2c152db01291c6a94e3df790af7da1c85fc.tar.gz |
Merge pull request #2708 from nanoant/patch/dont-convert-subtype-typedesc-params
Fix #2662: Don't convert subtype typedesc params
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r-- | compiler/sigmatch.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 2a9d15b5a..7ea2c3d6f 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1281,7 +1281,10 @@ proc paramTypesMatchAux(m: var TCandidate, f, argType: PType, result = implicitConv(nkHiddenStdConv, f, arg, m, c) of isSubtype: inc(m.subtypeMatches) - result = implicitConv(nkHiddenSubConv, f, arg, m, c) + if f.kind == tyTypeDesc: + result = arg + else: + result = implicitConv(nkHiddenSubConv, f, arg, m, c) of isSubrange: inc(m.subtypeMatches) if f.kind == tyVar: |