View Single Post
Old 11-18-2011, 07:16 PM   #3630
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 163

Barade is on a distinguished road (14)

Default

If you write:
Collapse JASS:
struct TestBase
    public stub method bla takes nothing returns nothing
    endmethod
endstruct

struct Test extends TestBase
    public method anotherOne takes nothing returns nothing
        call super.bla()
    endmethod

    public stub method bla takes nothing returns nothing
    endmethod
endstruct
it says
Quote:
Line x: Since you added [forcemethodevaluate] to jasshelper.conf, calling methods "from above their declaration" requires you to add .evaluate, correct this mistake.
Line x: You may alternatively edit jasshelper.conf and remove that option.
although I am calling the paren'ts "bla" using "super".

Furthermore:
Collapse JASS:
struct Test extends TestBase
    public method anotherOne takes nothing returns nothing
        call super.bla.evaluate() // syntax error
    endmethod

    public stub method bla takes nothing returns nothing
    endmethod
endstruct
cannot be used. Of course you can simply change the order of the methods since it's just an example!

There's another bug when calling constructors of private structs of a library from another struct's constructor which is declared in the same library, as well if those structs are declared AFTER the struct where you're calling the constructors from:
Collapse JASS:
library test
    struct Test
        private Test2 member

        public static method create takes nothing returns thistype
            local thistype this = thistype.allocate()
            set this.member = Test2.create.evaluate() // won't work since Test2 is private which doesn't make any sense to me
            return this
        endmethod
    endstruct

    private struct Test2 // removing "private" helps to avoid this bug
    endstruct
endlibrary

In 0.A.2.B I always get the following error which prevents me from using it:
Quote:
Line 30624: Unexpected : "
Line 30624: (At generated code): constant string s__Asl_website= "https:
30624 | public static constant string website = "https://gitorious.org/advanced-script-library"
This error doesn't occur using 0.A.2.A.

Btw. can someone confirm that using:
Collapse JASS:
globals
constant string test = GetLocalizedString("sadas")
endglobals
crashes the game in map selection?

Although this project doesn't seem to be maintained anymore it might be useful to report these bugs, anyway. I myself would continue developing JassHelper if it wasn't written in Pascal/Delphi/Windows dependent stuff.
I just want to say that there's at least me out there who still uses vJass for his project(s).
__________________
Barade is offline   Reply With Quote