When a class inherits from another class and defines @field [integer] string, assigning a table with implicit integer keys (e.g. { "hello" }) produces a assign-type-mismatch warning. Using explicit keys ({ [1] = "hello" }) or removing the inheritance both avoid the warning.
Reproduction:
---@class OptsBase
---@field foo? boolean
---@class Opts : OptsBase
---@field [integer] string
---@type Opts
local opts1 = { "hello" } -- Warning: Cannot assign `("hello")` to `Opts`. [assign-type-mismatch]
---@type Opts
local opts2 = { [1] = "hello" } -- No warning
Version: emmylua_ls 0.20.0