mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 11:24:08 +00:00
fixes #5892
This commit is contained in:
@@ -89,3 +89,22 @@ echo sizeof(testObject_1)
|
||||
echo sizeof(testObject_2)
|
||||
echo sizeof(testObject_3[int64])
|
||||
echo sizeof(testObject_4[int64])
|
||||
|
||||
# bug #5892
|
||||
type
|
||||
Foo6 = distinct array[4, float32]
|
||||
AnotherFoo = distinct array[4, float32]
|
||||
|
||||
AbstractAnimationSampler* = ref object of RootObj
|
||||
|
||||
AnimationSampler*[T] = ref object of AbstractAnimationSampler
|
||||
sampleImpl: proc(s: AnimationSampler[T], p: float): T
|
||||
|
||||
ArrayAnimationSampler*[T] = ref object of AnimationSampler[T]
|
||||
|
||||
proc newArrayAnimationSampler*[T](): ArrayAnimationSampler[T] =
|
||||
result.new()
|
||||
result.sampleImpl = nil
|
||||
|
||||
discard newArrayAnimationSampler[Foo6]()
|
||||
discard newArrayAnimationSampler[AnotherFoo]()
|
||||
|
||||
Reference in New Issue
Block a user