LSL-SLua: you can append void to lists
in progress
Frio Belmonte
default {
state_entry() {
list a = ["hello", "world"]+llSleep(0);
llOwnerSay((string)llGetListEntryType(a, -1)); // 8??? not a defined return value
llOwnerSay((string)a); // attempt to concatenate string with nil
}
}
Under LSL-Mono, this is a type mismatch at compilation. Trying to insert a void return value into a list directly is properly caught either way, it's just the appending that acts up.
Log In
H
Harold Linden
Frio Belmonte It was an issue in our LSL library, wasn't being defensive enough in the "any" case for acceptable types for
list
concatenation https://github.com/secondlife/tailslide/commit/9e468825bb74896df7eabce0f1ede4deabe2ff2cShould be fixed in the next server release, thanks again!
SuzannaLinn Resident
GetListEntryType() has two types added:
- 7 : table
- 8 : other types (boolean, function, thread, buffer)
in SLua, nil returns 0 (TYPE_INVALID)
H
Harold Linden
marked this post as
in progress
Thanks for the report!
Yeah, there's a lot of weird behavior around
void
in LSL, and a lot of it infects LSO as well. Totally forgot that somelist + foo
is type-checked differently from somelist + [foo]
. Fixing this now!