[Gambas-user] Issue 175 in gambas: The Array Base class does not work as expected

gambas at ...2524... gambas at ...2524...
Thu Dec 29 16:52:25 CET 2011


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 175 by emil.len... at ...626...: The Array Base class does not work  
as expected
http://code.google.com/p/gambas/issues/detail?id=175

1) Describe the problem.
The Array classes does not follow the inheritance rules. That leads to  
problems when using the Array Base class like this:

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK

3) Provide a little project that reproduces the bug or the crash.
   Dim a As Array
   Dim i As Integer
   For i = 1 To 2
     If i = 1 Then
       a = New Integer[1]
       a[0] = 1
     Else If i = 2 Then
       a = New String[1]
       a[0] = "2"
     End If
     Print a[0] + i 'Will print the address in memory for "2" + i the second  
time
   Next

Prints:
2
13148466
gbx3: warning: 2 allocation(s) non freed.





More information about the User mailing list