mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-02 20:14:44 +00:00
* fix #15958 * also cover openArray and VarArgs * more tests * cover even more types * cover even more types * Trigger build * Trigger build * cover sets passed as arrays
This commit is contained in:
@@ -282,7 +282,8 @@ proc ccgIntroducedPtr(conf: ConfigRef; s: PSym, retType: PType): bool =
|
||||
result = false
|
||||
# first parameter and return type is 'lent T'? --> use pass by pointer
|
||||
if s.position == 0 and retType != nil and retType.kind == tyLent:
|
||||
result = pt.kind != tyVar
|
||||
result = not (pt.kind in {tyVar, tyArray, tyOpenArray, tyVarargs, tyRef, tyPtr, tyPointer} or
|
||||
pt.kind == tySet and mapSetType(conf, pt) == ctArray)
|
||||
|
||||
proc fillResult(conf: ConfigRef; param: PNode) =
|
||||
fillLoc(param.sym.loc, locParam, param, ~"Result",
|
||||
|
||||
Reference in New Issue
Block a user