New feature found in the haxe compiler

63 views
Skip to first unread message

S.A. Asselbergs

unread,
Oct 12, 2016, 6:47:28 PM10/12/16
to Haxe
Hi fellow haxers,

If bugs are a feature, than this is a feature:

typedef Str = String;
@:forward(charAt, charCodeAt, indexOf, lastIndexOf, split, substr, substring, toLowerCase, toString, toUpperCase)
abstract String(Str){
    inline public function new (value:Str){
        this = value;
    }
}

It wil fail to build BUT the compiler will _not_ complain...

Greetings, Simon

S.A. Asselbergs

unread,
Oct 12, 2016, 6:54:06 PM10/12/16
to Haxe
I forgot to mention the target that produces this, is haxe.cs

Op donderdag 13 oktober 2016 00:47:28 UTC+2 schreef S.A. Asselbergs:
Reply all
Reply to author
Forward
0 new messages