Wheird inline behavior in haxe js

21 views
Skip to first unread message

Porfírio José Pereira Ribeiro

unread,
May 25, 2013, 8:04:18 PM5/25/13
to haxe...@googlegroups.com
Hi, if you look at this class:
class TestInline {
   
static function main() {
        trace
(test(""));
        trace
(test(String));        
        trace
(test2(""));
        trace
(test2(String));//Wont inline
   
}
   
static inline function test(o:Dynamic):Bool return (o != null);
   
static inline function test2(o:Dynamic):Bool return (o != null && o.v1!=null);
}

The first 3 function calls work as expected and even does some value checking but the 4º function call:
trace(test2(String));
Wont inline and generate:
console.log(TestInline.test2(String));
And the respective function declaration.

I dont know if this is the expected behavior, but i see no reason for not inline!
Reply all
Reply to author
Forward
0 new messages