We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local function a(s:string):string return (s:lower():gsub("a","b")); end
should be equivalent to string.gsub(s:lower(), "a", "b") and string.gsub(string.lower(s), "a", "b") but gives a type error.
string.gsub(s:lower(), "a", "b")
string.gsub(string.lower(s), "a", "b")
type error
The text was updated successfully, but these errors were encountered:
You're right; there appears to be a bug in the compiler for the : operator.
:
As a workaround, it works when you wrap the first member-call in brackets (although this should make no difference to Lua):
(s:lower()):gsub("a", "b")
Sorry, something went wrong.
This is a completely nonsense report, something is clearly broken here:
("a"):gsub("a", "b"):lower()
attempt to index '(string, integer)' with '"lower"'
No branches or pull requests
should be equivalent to
string.gsub(s:lower(), "a", "b")
andstring.gsub(string.lower(s), "a", "b")
but gives atype error
.The text was updated successfully, but these errors were encountered: