update - #1017
update#1017
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces significant changes to the EmmyLua analysis engine, including a new module visibility system, improved workspace path configuration, and a new diagnostic check for inconsistent type access modifiers. The export tag has been removed in favor of a more robust visibility system. I have reviewed the changes and suggest removing the commented-out code block in crates/emmylua_code_analysis/src/compilation/analyzer/doc/property_tags.rs to maintain code cleanliness.
| // 返回变量不能附加可见性 | ||
| // LuaExpr::NameExpr(name_expr) => { | ||
| // let name = name_expr.get_name_text()?; | ||
| // let tree = analyzer | ||
| // .db | ||
| // .get_decl_index() | ||
| // .get_decl_tree(&analyzer.file_id)?; | ||
| // let decl = tree.find_local_decl(&name, name_expr.get_position())?; | ||
|
|
||
| // Some(LuaSemanticDeclId::LuaDecl(decl.get_id())) | ||
| // } |
Extends generic declarations to support `= default` syntax and tokenization. Splits generic parsing into constraint vs default type accessors so type inference uses only constraints and ignores defaults, preventing misinterpreting defaults as bounds. Adds parser and syntax-level tests to cover default types and combined constraint+default cases.
|
f407e4b introduced a regression that persists on |
|
@clason This is a breaking change. Earlier, I mistakenly treated |
|
https://github.com/nvim-treesitter/nvim-treesitter It's enough to clone this repo and run I am not aware of using type extensions at all. |
This issue has nothing to do with generics. |
|
That may be (and what I assume); nevertheless, I bisected the regression to that commit. Note that the examples I listed deliberately do not involve any user-defined functions; only LuaJIT builtins that emmyluals defines the annotations for. |
I have time to look into this issue; by the way, why this project was archived? |
Long story I don't want to go much into right now; some people were very vocal in their dislike of the way I handled things, and I didn't want to have to deal with that anymore. The important thing is that it's still available and doing what it was designed to do. |
Confirmed it's a generic issue. A long time ago, I used a workaround to treat all such cases as 'any', and this operation has been removed in this commit.
This is an incorrect notation; |
|
|
I am referring to |
constructor特性第四个参数从return_self更改为return_mode以支持返回值使用泛型