Another Lua incompatibility? (methods on String)

Aug 29, 2014 at 7:06 PM
Edited Aug 29, 2014 at 7:07 PM
> a = "ab"
> print(a:sub(1, 1))
LuaRuntimeException: 'String:sub' not found.
 at line(LuaGlobal _G) line line:2:9
I've a lot of existing Lua code to migrate that uses string.* shorthands, so support for this would be helpful. (unless the emitter actually will bind to extension methods as the C# compiler does?)
Aug 29, 2014 at 9:27 PM
Edited Aug 29, 2014 at 9:58 PM
Now, you got me. This will work in version 0.9 or higher.
I already implemented the support of extension methods, and your example works smoothly :).

Sorry, but I did the change in the branch, where I prepare the traceline debugger and this one is not ready to publish.
NeoLua Interactive Command
Version NeoLua 5.3 ( by neolithos

  source code at
  supported from

  Write ':h' for help.

> a = "ab"
> print(a:sub(1,1))
I do not if it is good to publish a library were the most test cases fail, currently ;).

It will take may be 4 weeks the get a first version to run. But currently the wheater sucks in germany, may be earlier ;).

If your interested check out the Changeset 31392