-
-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lua String with
no-inline
(#11057)
* Hide lua String inlines * Patch string metatable * Fix both inline modes * Okay, real fix time
- Loading branch information
Showing
6 changed files
with
43 additions
and
8 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
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,21 @@ | ||
using StringTools; | ||
|
||
@:nullSafety(Strict) | ||
class Main { | ||
static var f = "field"; | ||
static function main() { | ||
final sclass = new String("foo"); | ||
final scl = sclass.toUpperCase(); | ||
trace(scl); | ||
final f2 = f.toUpperCase(); | ||
trace(f2); | ||
final str = "str".toUpperCase(); | ||
trace(str); | ||
final isS = "sss".startsWith("s"); | ||
trace(isS); | ||
// test internal static call | ||
final i = "foo".indexOf(""); | ||
trace(i); | ||
trace(("dyn" : Dynamic).toUpperCase()); | ||
} | ||
} |
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,4 @@ | ||
-main Main | ||
-lua bin/test.lua | ||
--cmd lua bin/test.lua | ||
-D no-inline |
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,6 @@ | ||
Main.hx:9: FOO | ||
Main.hx:11: FIELD | ||
Main.hx:13: STR | ||
Main.hx:15: true | ||
Main.hx:18: 0 | ||
Main.hx:19: DYN |
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