forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix haxe.PosInfos regression (closes HaxeFoundation#3348)
- Loading branch information
Showing
2 changed files
with
39 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package unit.issues; | ||
|
||
class Issue3348 extends Test { | ||
|
||
function test() { | ||
eq("unit.issues.Issue3348,Issue3348.hx,6,test", getPos1()); | ||
eq("unit.issues.Issue3348,Issue3348.hx,7,test", getPos2()); | ||
eq("unit.issues.Issue3348,Issue3348.hx,8,test", getPos3("ok")); | ||
eq("unit.issues.Issue3348,Issue3348.hx,9,test", getPos4(1)); | ||
} | ||
|
||
static function getPosString(p:haxe.PosInfos) { | ||
return [p.className, p.fileName, Std.string(p.lineNumber), p.methodName].join(","); | ||
} | ||
|
||
static function getPos1(?p:haxe.PosInfos) { | ||
return getPosString(p); | ||
} | ||
|
||
static function getPos2(?s:String, ?p:haxe.PosInfos) { | ||
return getPosString(p); | ||
} | ||
|
||
static function getPos3(s:String, ?p:haxe.PosInfos) { | ||
return getPosString(p); | ||
} | ||
|
||
static function getPos4(?s:String, ?i:Int, ?p:haxe.PosInfos) { | ||
return getPosString(p); | ||
} | ||
} |
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