CFE: Improperly failed inference with promoted type parameters #35800
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Here, the call to f should be valid and inferrable as
Cloneable<T>
.However it fails in analyzer and CFE. This is the CFE ticket for this issue. (analyzer is #35799)
I can't speak to the CFE's architecture, but in the analyzer codebase
object
is promoted to typeT' extends SubCloneable<T>
. So if the analyzer attempts to inferSubClonable<T>
forT
inf(object)
, then that will fail. However, it should be possible to infer Clonable, which in fact works when typed explicitly.May be related to #35100
The text was updated successfully, but these errors were encountered: