Created
September 15, 2013 10:13
-
-
Save jasononeil/6569404 to your computer and use it in GitHub Desktop.
In Haxe, a member trace() method does not have priority over the haxe.Log.trace()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import haxe.PosInfos; | |
class TraceMemberMethod | |
{ | |
static function main() new TraceMemberMethod(); | |
public function new() { | |
messages = []; | |
trace( "hey" ); // Uses haxe.Log.trace() | |
this.trace( "hey" ); // Uses this.trace() | |
} | |
var messages:Array<String>; | |
public function trace( v:Dynamic, ?p:PosInfos ) { | |
messages.push( '$v' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice if Haxe respected a local trace() over the global one...