-
-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[js] consider statics of @:native("") classes when renaming local vars (
closes #6448)
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
package unit.issues; | ||
|
||
@:native("some") | ||
@:native("some6448") | ||
private class C { | ||
public var v = true; | ||
public function new() {} | ||
} | ||
|
||
@:native("") | ||
private extern class Lib { | ||
@:native("___hx_returnTrue") | ||
static function returnTrue():Bool; | ||
|
||
static function __init__():Void { | ||
untyped __js__("function ___hx_returnTrue() { return true; }"); | ||
} | ||
} | ||
|
||
class Issue6448 extends unit.Test { | ||
#if js | ||
@:analyzer(no_local_dce) | ||
function test() { | ||
var some = null; | ||
var some6448 = null; | ||
t(new C().v); | ||
|
||
function ___hx_returnTrue() return false; | ||
t(Lib.returnTrue()); | ||
} | ||
#end | ||
} |