fixes 'newSeq[T]' instantiation bug
This commit is contained in:
parent
c3adc19f47
commit
dbc8aa60e3
5 changed files with 27 additions and 11 deletions
|
|
@ -6,6 +6,18 @@ var a: PA[string]
|
|||
new(a)
|
||||
a.field = "some string"
|
||||
|
||||
|
||||
proc someOther[T](len: string): seq[T] = discard
|
||||
proc someOther[T](len: int): seq[T] = echo "we"
|
||||
|
||||
proc foo[T](x: T) =
|
||||
var s = someOther[T](34)
|
||||
#newSeq[T](34)
|
||||
|
||||
foo 23
|
||||
|
||||
|
||||
|
||||
when false:
|
||||
# Compiles unless you use var a: PA[string]
|
||||
type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue