https://bugs.documentfoundation.org/show_bug.cgi?id=146082

--- Comment #3 from Leslie <[email protected]> ---
I have added an attachment which shows 1 aspect of this bug in much simpler
code.      
2 simple integer classes and a collector class.  
Both the simple integer classes look like this: 

private _a as integer 

private sub class_initialize() 
end sub 
private sub class_terminate() 
end sub 

And the collector like this: 

public _a() as object 'ClassA
public _c() as ClassC
private _upperBound as integer

private sub class_initialize() 
   _upperBound = -1
end sub 
private sub class_terminate() 
end sub 
public sub AddElements(byref elementA as ClassA, byref elementC as ClassC)
   _upperBound = _upperBound + 1
   redim preserve _a(0 to _upperBound)
   set _a(_upperBound) = elementA
   redim preserve _c(0 to _upperBound)
   set _c(_upperBound) = elementC
   msgbox(_a(0)._a) 
   msgbox(_c(0)._c)
end sub

And then a test to see what happens: 
public sub test() 
   dim n as integer 
   dim a as ClassA, b as ClassB, c as ClassC, d as ClassD

   set a = new ClassA 
   a._a = 10
   set c = new ClassC 
   c._c = 12

   set b = new ClassB
   b.AddElements(a,c)
end sub 

When in the above code _a() is defined as ClassA the message box will always
show 0. 
When it is defined as object it will show the expected result 10.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to