Skip to content

Access/calls on nonexistent properties in optional chaining does not raise error #1085

@GlassBricks

Description

@GlassBricks

In an optional chain, if a nonexistent property (nil) later in the chain is called or accessed, it silently fails and returns nil.
In typescript, these gives a runtime error instead.

https://typescripttolua.github.io/play#code/PTAEEMBtNAXALApgZ0aADgJwJYDtbKjLwD2ArpACagDm2AbmoppiZsgFAcDGJuysUCQBGAKwBcEXAE9QAXlABvAL5cseWAAoRogPwA6AGYkSmgJRm1OfNrEHh4TPocAvSzz4ChYgEzylHKBBoMYkkioQhOAyHKoc6jY6Pgahzo7m7kA

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions