diff options
author | cooldome <cdome@bk.ru> | 2018-02-10 15:44:41 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-02-10 16:44:41 +0100 |
commit | 51d81c4e23c7f5513a1b2028f02509c860021278 (patch) | |
tree | ec5f0b8f8569a4447a3feb64df1022460e7918a7 /compiler | |
parent | 29226ce5b2d6267faf45644d3e058c782610f2df (diff) | |
download | Nim-51d81c4e23c7f5513a1b2028f02509c860021278.tar.gz |
Fixes #6853 (#7188)
* Fixes #6853 * Add a test for a const empty array
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 090f30f16..aba36d24d 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1145,7 +1145,12 @@ proc typeRelImpl(c: var TCandidate, f, aOrig: PType, fRange = prev let ff = f.sons[1].skipTypes({tyTypeDesc}) let aa = a.sons[1].skipTypes({tyTypeDesc}) - result = typeRel(c, ff, aa) + + if f.sons[0].kind != tyGenericParam and aa.kind == tyEmpty: + result = isGeneric + else: + result = typeRel(c, ff, aa) + if result < isGeneric: if nimEnableCovariance and trNoCovariance notin flags and |