[Gambas-user] [Gambas Bug Tracker] Bug #1131: Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression

2017-07-31 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1131=L21haW4-

Comment #1 by Adrien PROKOPOWICZ:

I've actually found a fix to evaluate the expression before entering the WITH 
block. 
But since I'm not confident enough with the compiler's internals to commit it 
directly, I put it in a separate temporary branch on the git repository.
The merge request can be found here : 
https://gitlab.com/prokopyl/gambas/merge_requests/1/diffs



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1131: Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression

2017-07-31 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1131=L21haW4-

Adrien PROKOPOWICZ added an attachment:

gbc.out



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1131: Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression

2017-07-31 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1131=L21haW4-

Adrien PROKOPOWICZ reported a new bug.

Summary
---

Nested WITHs : Cannot use the WITH variable shortcut in child WITH's expression

Type : Bug
Priority : Medium
Gambas version   : 3.9.90 (TRUNK)
Product  : Language


Description
---

In less confused terms, it means the following construct will not work at 
runtime :

  With obj
.A = 69
With .T2
  .B = 42
End With
  End With

It fails at the second With's declaration with the error : "#12: Not an 
object", although the expression "obj.T2.B = 42" alone is valid and works well.

You can see the full code running here : 
https://gambas-playground.proko.eu/?gist=7404d762b30f40b129f8f6faa8fbe19e

In the example the construct in the TestYes() function works, but the TestNo() 
fails with the above error.

I also looked at the compiled code generated by the compiler (see attached), 
and it seems that the bad function tries to load the variable's value from a 
different stack location (see line 9), which could explain why the interpreter 
finds a bad value.
(This is pure speculation since I know close to nothing about the Gambas 
bytecode, but I thought it might help)


System information
--

[System]
Gambas=3.10.90 git 4304011b0
OperatingSystem=Linux
Kernel=4.12.3-1-ARCH
Architecture=x86_64
Distribution=Arch Linux
Desktop=KDE5
Theme=Breeze
Language=fr_FR.UTF-8
Memory=15965M

[Libraries]
Cairo=libcairo.so.2.11400.10
Curl=libcurl.so.4.0.0
Curl=libcurl.so.4.1.0
Curl=libcurl.so.4.2.0
Curl=libcurl.so.4.3.0
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.11
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.1202.0
GTK+2=libgtk-x11-2.0.so.0.2400.31
GTK+3=libgtk-3.so.0.2200.17
OpenGL=libGL.so.1.0.0
Poppler=libpoppler.so.67.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.9.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
ANT_HOME=/usr/share/apache-ant
COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=/usr/share/xsessions/plasma
DISPLAY=:0
GB_GUI=gb.qt5
GEM_HOME=/.rvm/gems/ruby-2.3.3
GEM_PATH=/.rvm/gems/ruby-2.3.3:/.rvm/gems/ruby-2.3.3@global
GRADLE_HOME=/usr/share/java/gradle
GS_LIB=/.fonts
GTK_MODULES=canberra-gtk-module
HOME=
IRBRC=/.rvm/rubies/ruby-2.3.3/.irbrc
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
LANG=fr_FR.UTF-8
LANGUAGE=
LOGNAME=
MAIL=/var/spool/mail/
MAVEN_OPTS=-Xmx512m
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
MY_RUBY_HOME=/.rvm/rubies/ruby-2.3.3
OLDPWD=
PATH=/.rvm/gems/ruby-2.3.3/bin:/.rvm/gems/ruby-2.3.3@global/bin:/.rvm/rubies/ruby-2.3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/.rvm/bin
PT5HOME=/opt/pt
PWD=
QSG_RENDER_LOOP=
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_NO_GLIB=1
QT_QUICK_CONTROLS_STYLE=org.kde.desktop
RUBY_VERSION=ruby-2.3.3
SESSION_MANAGER=local/:@/tmp/.ICE-unix/623,unix/:/tmp/.ICE-unix/623
SHELL=/usr/bin/zsh
SHLVL=1
TZ=:/etc/localtime
USER=
XAUTHORITY=/.Xauthority
XCURSOR_SIZE=0
XCURSOR_THEME=breeze_cursors
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=c2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
XDG_SESSION_TYPE=x11
XDG_VTNR=1
_=/usr/bin/kwrapper5
__GL_SYNC_TO_VBLANK=1
_system_arch=x86_64
_system_name=Arch
_system_type=Linux
_system_version=libc-2.25
rvm_bin_path=/.rvm/bin
rvm_path=/.rvm
rvm_prefix=
rvm_version=1.27.0 (latest)



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user