Optional chaining operator (?.) is bad implemented. I posted the code to reproduce and the expected behaviour down this post.
Canary & FXServer version: 6425
Category: Scripting
To reproduce:
Test = {}
Test.cases = {
[0] = {
values = {
a = 1.0
}
}
}
print(Test.cases[1]?.values) -- return nil (expected behaviour)
print(Test.cases[1]?.values.a) -- attempt to index a nil value (unexpected behaviour, should return nil)
print(Test.cases[1]?.values?[nil]) -- crash game