You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implTyVarCache{/// Warn when a type does not need to be a type variable, such as `|T| T -> Int` (it should be `Obj -> Int`).////// TODO: This warning is currently disabled because it raises a false warning in cases like `|T|(x: T) -> (y: T) -> (x, y)`.pubfnwarn_isolated_vars(&self,ctx:&Context){for(name, vi)inself.var_infos.iter(){let refs = &ctx.index().get_refs(&vi.def_loc).unwrap().referrers;if refs.len() == 1{let warn = TyCheckError::unnecessary_tyvar_warning(
ctx.cfg.input.clone(),line!()asusize,
vi.def_loc.loc,
name.inspect(),
ctx.caused_by(),);
ctx.shared().warns.push(warn);}}}}
As noted in the TODO, this is not currently enabled as it may cause a false warning. I can rewrite it correctly, but for now I have other tasks to do, so I will leave it as a code issue.
Additional context
No response
Erg version
0.6.18.nightly
Python version
None
OS
None
The text was updated successfully, but these errors were encountered:
Describe the code issue?
Recently, I implemented
warn_isolated_vars
.As noted in the TODO, this is not currently enabled as it may cause a false warning. I can rewrite it correctly, but for now I have other tasks to do, so I will leave it as a code issue.
Additional context
No response
Erg version
0.6.18.nightly
Python version
None
OS
None
The text was updated successfully, but these errors were encountered: