Analyzer doesn't properly implement horizontal inference when record types are involved #59933
Labels
analyzer-spec
Issues with the analyzer's implementation of the language spec
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Thanks to @mraleph for discovering this issue, and @lrhn for bringing it to my attention.
The following code is accepted by the CFE but not the analyzer:
The analyzer reports the error:
The reason this is happening is that when examining the type signature for
f
, the analyzer fails to notice that the type variableT
appears free in the type(T,)
, so when analyzingf(('',), (s) { s.length; })
, it doesn't schedule a round of horizontal inference between analysis of('',)
and(s) { s.length; }
.I'm working on a fix.
The text was updated successfully, but these errors were encountered: