* fix #15825

* better fix
This commit is contained in:
cooldome
2020-11-09 18:24:32 +00:00
committed by GitHub
parent c1664f93b0
commit 338602a402
2 changed files with 12 additions and 1 deletions

View File

@@ -1056,7 +1056,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
# disable the bindOnce behavior for the type class
result = recurse(paramType.base, true)
of tyAlias, tyOwned:
of tyAlias, tyOwned, tySink:
result = recurse(paramType.base)
of tySequence, tySet, tyArray, tyOpenArray,

View File

@@ -172,3 +172,14 @@ when true: # D20200607T202043
main2()
#------------------------------------------------------------
# Issue #15825
type
Union = string | int | char
proc run(a: sink Union) =
discard
run("123")