-
Notifications
You must be signed in to change notification settings - Fork 6
Description
definitions/library/renoise/song.lua
Line 35 in 413fe28
| ---@field start_line integer? Start pattern line index |
The values like start_track etc. are notated as integer?, but could they actually be nil? AFAIK either the entire selection itself is nil or every field exists.
I assume this is notated this way because you can assign an incomplete selection, but you can never read such a thing, right? The issue is that this annotation raises warnings for safe code that reads the selection and tries to use its values after checking that the selection itself isn't nil.
Not sure how to solve this though unless setting the selection was moved to a function and the field itself was made read-only, but maybe it would be better to allow false positive warnings for the case when you are assigning an incomplete table instead, I assume this is used less in practice.