mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-29 18:11:44 +00:00
* fixes #21674; `lent` can be used in the fields or the cast type as a parameter * add a test case * fix the test
This commit is contained in:
@@ -261,7 +261,7 @@ proc isCastable(c: PContext; dst, src: PType, info: TLineInfo): bool =
|
||||
return false
|
||||
elif srcSize < 0:
|
||||
return false
|
||||
elif typeAllowed(dst, skParam, c) != nil:
|
||||
elif typeAllowed(dst, skParam, c, {taIsCastable}) != nil:
|
||||
return false
|
||||
elif dst.kind == tyProc and dst.callConv == ccClosure:
|
||||
return src.kind == tyProc and src.callConv == ccClosure
|
||||
|
||||
Reference in New Issue
Block a user