mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 09:14:00 +00:00
fixes 'newSeq[T]' instantiation bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user