[BUG] First process' publics seen as locals [FIXED]

Started by Sandman, November 27, 2008, 12:38:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sandman

Seen as there is no bug report subforum, I thought I'd post it here:


import "mod_say"
import "mod_time"
import "mod_proc"

Local
   int loc = 1;
End

Process Another()
Public
   int pub = 2;
Begin
   Loop
       frame;
   End
End

Process Second()
Public
   int pub2 = 3;
Begin
   Loop
       frame;
   End
End

Process Main()
Private
   Another a;
   int b;
   int c;
Begin

   a = Another();
   b = Another();
   c = Second();

   say("a.loc = " + a.loc);
   say("b.loc = " + b.loc);
   say("a.pub = " + a.pub);
   say("b.pub = " + b.pub); // not possible, but compiles and runs! <- BUG!
   say("c.pub = " + c.pub); // not possible, but compiles! <- BUG!
                            // Returned is actually c.pub2 (logical: same offset and size)
   //say("c.pub2 = " + c.pub2); // not possible and doesn't compile (good)

   signal(a,S_KILL);
   signal(b,S_KILL);
   signal(c,S_KILL);

End


Output:
a.loc = 1
b.loc = 1
a.pub = 2
b.pub = 2
c.pub = 3
-- Sandman

SplinterGU

hohoho! maybe because this publics are from first process...
cool! thanks...

yes, they'll don't must work...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

SplinterGU

#2

    say("b.pub = " + b.pub); // not possible, but compiles and runs! <- BUG!
    say("c.pub = " + c.pub); // not possible, but compiles! <- BUG!
                             // Returned is actually c.pub2 (logical: same offset and size)


This codes are fixed... I don't know if last fix (http://forum.bennugd.org/index.php?topic=356.0) do that this errors are fixes or other fix...

Then this bugs are fixed...

Thanks.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

-- Sandman