LuaLS / LuaLS/lua-language-server

[Request] Ability to specify base class visibility for child

Open
#1,866 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

The main idea is simple:

---@class Letter
---@field shape any

---@class A : private Letter
local a = { }
function a:example() 
  return self.shape -- fine
end

---@class B : A
local b = { }
function b:example2()
  return self.shape -- error/warn
end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test. Start by tracing how LuaLS handles ---@class inheritance and field-visibility diagnostics, then inspect related annotation tests; done means a private base field is accepted in A but warned on in B as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.