Autor Tema: [BUG] First process' publics seen as locals [FIXED]  (Leído 1615 veces)

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
[BUG] First process' publics seen as locals [FIXED]
« en: Noviembre 27, 2008, 12:38:41 pm »
Seen as there is no bug report subforum, I thought I'd post it here:

Código: [Seleccionar]
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:
Código: [Seleccionar]
a.loc = 1
b.loc = 1
a.pub = 2
b.pub = 2
c.pub = 3
« última modificación: Enero 17, 2010, 08:35:59 pm por Sandman »
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12756
  • Karma: 375
Re: [BUG] First process' publics seen as locals
« Respuesta #1 en: Noviembre 27, 2008, 01:42:50 pm »
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

  • Hero Member
  • *****
  • Mensajes: 12756
  • Karma: 375
Re: [BUG] First process' publics seen as locals
« Respuesta #2 en: Diciembre 27, 2008, 02:56:09 am »
Código: [Seleccionar]
    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.
« última modificación: Diciembre 27, 2008, 02:58:39 am por SplinterGU »
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] First process' publics seen as locals
« Respuesta #3 en: Diciembre 27, 2008, 11:00:47 am »
Excellent!
-- Sandman