| 1 |
# https://github.com/godotengine/godot/issues/64171 |
| 2 |
# https://github.com/godotengine/godot/issues/60145 |
| 3 |
|
| 4 |
var s = "abc" |
| 5 |
var sn = &"abc" |
| 6 |
|
| 7 |
func test(): |
| 8 |
print("Compare ==: ", "abc" == &"abc") |
| 9 |
print("Compare ==: ", &"abc" == "abc") |
| 10 |
print("Compare !=: ", "abc" != &"abc") |
| 11 |
print("Compare !=: ", &"abc" != "abc") |
| 12 |
|
| 13 |
print("Concat: ", "abc" + &"def") |
| 14 |
print("Concat: ", &"abc" + "def") |
| 15 |
print("Concat: ", &"abc" + &"def") |
| 16 |
|
| 17 |
match "abc": |
| 18 |
&"abc": |
| 19 |
print("String matched StringName literal") |
| 20 |
_: |
| 21 |
print("no Match") |
| 22 |
|
| 23 |
match &"abc": |
| 24 |
"abc": |
| 25 |
print("StringName matched String literal") |
| 26 |
_: |
| 27 |
print("no Match") |
| 28 |
|
| 29 |
match "abc": |
| 30 |
sn: |
| 31 |
print("String matched StringName") |
| 32 |
_: |
| 33 |
print("no match") |
| 34 |
|
| 35 |
match &"abc": |
| 36 |
s: |
| 37 |
print("StringName matched String") |
| 38 |
_: |
| 39 |
print("no match") |