Nekit1234007 / cjass

Automatically exported from code.google.com/p/cjass
0 stars 0 forks source link

ADicHelper crashs at Parsing: function and variables #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
This library http://peeeq.de/code.php?id=4745
Cant be compiled

What is the expected output? What do you see instead?
No error expected, JassHelper compiles fine.
Instead Adic Crashes.

What version of the product are you using? On what operating system?
1.4.2.32

Original issue reported on code.google.com by erwgfifo...@gmail.com on 11 Aug 2011 at 5:10

GoogleCodeExporter commented 9 years ago
Yes, bug exist (it also crash in 1.4.3.33). Thx, I look it tomorrow.

Original comment by adi...@gmail.com on 11 Aug 2011 at 5:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The crash in the lib is using a local in an if statement with a return inside 
the if statement (any non argument local) where there is at least 1 local 
handle declared

function a takes nothing returns real
    local handle b
    if (b==null) then
        return 0.
    endif
    return 0.
endfunction

This would also die
function a takes nothing returns real
    local real r
    local handle r2
    if (r==1) then
        return 0.
    endif
    return 0.
endfunction

But this would not die
function a takes nothing returns real
    local real r
    local integer r2
    if (r==1) then
        return 0.
    endif
    return 0.
endfunction

nor would this
function a takes handle b returns real
    local real r
    if (b==null) then
        return 0.
    endif
    return 0.
endfunction

Original comment by mrasolo...@gmail.com on 11 Aug 2011 at 8:23

GoogleCodeExporter commented 9 years ago
Just found out that this crashes too ;p

real a(handle b) {
    real r
    handle h
    handle c
    if (b==null) {
        return 0.
    }
    return 0.
}

Original comment by mrasolo...@gmail.com on 11 Aug 2011 at 8:25

GoogleCodeExporter commented 9 years ago
This is specific bug of 1.4.2.32/33 (I do not remember...)
Compiles fine in 1.4.2.34 (don't posted yet, I want test it with all issues 
samples)

Original comment by adi...@gmail.com on 12 Aug 2011 at 4:59

GoogleCodeExporter commented 9 years ago
Saved successfully with .35

Original comment by adi...@gmail.com on 15 Aug 2011 at 4:46