* fix #15825

* better fix

(cherry picked from commit 338602a402)
This commit is contained in:
cooldome
2020-11-09 18:24:32 +00:00
committed by narimiran
parent 4e89dffc15
commit 7724cd534f
2 changed files with 12 additions and 1 deletions

View File

@@ -1058,7 +1058,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")