mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Test string shadow
This commit is contained in:
parent
5a6912fe75
commit
7fbe3a006c
1 changed files with 6 additions and 1 deletions
|
@ -46,6 +46,11 @@ assertEq(`1 {`2 {`3 {4}`}`}`, "1 2 3 4")
|
|||
local health = 50
|
||||
assert(`You have {health}% health` == "You have 50% health")
|
||||
|
||||
-- INTERP TODO: Test with shadowing `string` (both as a string and not)
|
||||
local function shadowsString(string)
|
||||
return `Value is {string}`
|
||||
end
|
||||
|
||||
assertEq(shadowsString("hello"), "Value is hello")
|
||||
assertEq(shadowsString(1), "Value is 1")
|
||||
|
||||
return "OK"
|
||||
|
|
Loading…
Add table
Reference in a new issue