{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4864","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4864/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4864/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4864/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4864","id":135106358,"number":4864,"title":"Unconsistent toString and trace on JS and Python (and maybe others)","user":{"login":"mcheshkov","id":1045163,"avatar_url":"https://avatars.githubusercontent.com/u/1045163?v=3","gravatar_id":"","url":"https://api.github.com/users/mcheshkov","html_url":"https://github.com/mcheshkov","followers_url":"https://api.github.com/users/mcheshkov/followers","following_url":"https://api.github.com/users/mcheshkov/following{/other_user}","gists_url":"https://api.github.com/users/mcheshkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mcheshkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcheshkov/subscriptions","organizations_url":"https://api.github.com/users/mcheshkov/orgs","repos_url":"https://api.github.com/users/mcheshkov/repos","events_url":"https://api.github.com/users/mcheshkov/events{/privacy}","received_events_url":"https://api.github.com/users/mcheshkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-20T18:01:44Z","updated_at":"2016-02-20T18:14:30Z","closed_at":null,"body":"```haxe\r\nclass A {\r\n    public function new(){}\r\n    \r\n    public function toString(){\r\n        return \"my class\";\r\n    }\r\n}\r\n\r\nclass Test {\r\n    static function main() {\r\n        var a = new A();\r\n        trace(a);\r\n    }\r\n}\r\n```\r\n\r\nTested on what I had nearby\r\n\r\n```\r\n$ haxe -main Test -js test.js && node test.js\r\n{}\r\n\r\n$ haxe -main Test -python test.py && python test.py\r\n<__main__.A instance at 0x7fcd4b6fd560>\r\n\r\n$ haxe -main Test -neko test.n && neko test.n\r\nTest.hx:12: my class\r\n\r\n$ haxe -main Test -cpp test.cpp && test.cpp/Test\r\n# some output omitted\r\nTest.hx:12: my class\r\n\r\n$ haxe -main Test -java test.java  && java -jar test.java/Test.jar\r\nhaxelib run hxjava hxjava_build.txt --haxe-version 3201 --feature-level 1\r\njavac \"-sourcepath\" \"src\" \"-d\" \"obj\" \"-g:none\" \"@cmd\"\r\nTest.hx:12: my class\r\n\r\n$ haxe -main Test -cs test.cs && mono test.cs/bin/Test.exe\r\nhaxelib run hxcs hxcs_build.txt --haxe-version 3201 --feature-level 1\r\nTest.hx:12: my class\r\n```\r\n\r\nIf you look in generated code there's no call to `toString`, only to `str` in python.\r\nBoth js and python issues seems to come from `has_feature ctx \"haxe.Log.trace\"` - I've found no other references to that feature.\r\n\r\nUbuntu 15.10, Haxe 3.2.1 from PPA"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/186661487","html_url":"https://github.com/HaxeFoundation/haxe/issues/4864#issuecomment-186661487","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4864","id":186661487,"user":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T18:14:30Z","updated_at":"2016-02-20T18:14:30Z","body":"That might be the expected behavior due to our Hello-World-optimization on these targets. "}}