mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 04:24:45 +00:00
@@ -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
|
||||
|
||||
@@ -38,3 +38,11 @@ var found: array[0..filesToCreate.high, bool]
|
||||
|
||||
echo found.len
|
||||
|
||||
# make sure empty arrays are assignable (bug #6853)
|
||||
const arr1: array[0, int] = []
|
||||
const arr2 = []
|
||||
let arr3: array[0, string] = []
|
||||
|
||||
doAssert(arr1.len == 0)
|
||||
doAssert(arr2.len == 0)
|
||||
doAssert(arr3.len == 0)
|
||||
|
||||
Reference in New Issue
Block a user