Repository navigation
pub: inherit enum variant visibility and filter LSP hover/definition - #213
Merged
Merged
Conversation
- Enum variants are SYM_FN entries; they now carry the enum owner and export bit, so variants of a non-pub enum are not visible across libraries (pub enum variants remain constructible). - LSP hover/definition run under the document library and use the same sym_visible/func_visible checks; type hover/definition also checks the type symbol visibility. - LSP records g_source_name so the main file owner is resolved. - test_lsp_visibility pins pub type hover.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
补齐
pub边界最后两个未接线面。enum 变体
枚举变体是
SYM_FN符号,但之前node = -1,owner/pub 未设置 ⇒ 非pubenum 的变体跨库仍可被符号表找到。pubenum 变体跨库不可见;pubenum 变体保持可构造。LSP hover / definition
@user)为上下文,函数走find_func(含func_visible)。analysis_type_visible:find_sym+sym_visible,非 pub 库类型不再显示结构体/枚举详情或跳转。lsp_check_file记录g_source_name,主文件 owner 正确。判据
test_lsp_visibility新增:import hashmap文档中IntMaphover 必须返回struct IntMap ...;补全仍不出现IntMap.findKey/findSlot/grow。selfhost-tests/bootstrap-tests/check全绿;canary5/5 不变。