mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
fixes #6889
This commit is contained in:
@@ -247,6 +247,9 @@ proc hashType(c: var MD5Context, t: PType; flags: set[ConsiderFlag]) =
|
||||
if tfNoSideEffect in t.flags: c &= ".noSideEffect"
|
||||
if tfThread in t.flags: c &= ".thread"
|
||||
if tfVarargs in t.flags: c &= ".varargs"
|
||||
of tyArray:
|
||||
c &= char(t.kind)
|
||||
for i in 0..<t.len: c.hashType(t.sons[i], flags-{CoIgnoreRange})
|
||||
else:
|
||||
c &= char(t.kind)
|
||||
for i in 0..<t.len: c.hashType(t.sons[i], flags)
|
||||
|
||||
@@ -98,3 +98,18 @@ proc print(pos: Position) =
|
||||
var x = 0.n16
|
||||
var y = 0.n16
|
||||
print((x, y))
|
||||
|
||||
|
||||
# bug #6889
|
||||
proc createProgressSetterWithPropSetter[T](setter: proc(v: T)) = discard
|
||||
|
||||
type A = distinct array[4, float32]
|
||||
type B = distinct array[3, float32]
|
||||
|
||||
type Foo[T] = tuple
|
||||
setter: proc(v: T)
|
||||
|
||||
proc getFoo[T](): Foo[T] = discard
|
||||
|
||||
createProgressSetterWithPropSetter(getFoo[A]().setter)
|
||||
createProgressSetterWithPropSetter(getFoo[B]().setter)
|
||||
|
||||
Reference in New Issue
Block a user