fixes #2220; #2219; breaks #2022; for #2022 callsite needs to be used

This commit is contained in:
Araq 2015-03-09 15:02:28 +01:00
commit 1efb5174f2
12 changed files with 290 additions and 171 deletions

View file

@ -0,0 +1,22 @@
discard """
output: '''ref ref T ptr S'''
"""
proc foo[T](x: T) =
echo "only T"
proc foo[T](x: ref T) =
echo "ref T"
proc foo[T, S](x: ref ref T; y: ptr S) =
echo "ref ref T ptr S"
proc foo[T, S](x: ref T; y: ptr S) =
echo "ref T ptr S"
proc foo[T](x: ref T; default = 0) =
echo "ref T; default"
var x: ref ref int
var y: ptr ptr int
foo(x, y)