Can't use type this
in a static getter, but I can if its a method.. with a generic. But getters don't support generics.
#54322
Labels
Duplicate
An existing issue was already created
Bug Report
In the following code
The type of
this
is not inferred correctly as it would do if it were an instance method.But it works as expected if the static getter is changed to a method with generics workaround trickery.
But then I'm forced to use a method call instead of a property access. I want a property 😥
🔎 Search Terms
static getter this type
There is a similar issue but it doesn't take into account statics.
#35986
🕗 Version & Regression Information
⏯ Playground Link
Playground link A
Playground link B
💻 Code
In the description
🙁 Actual behavior
In the description
🙂 Expected behavior
In the description
The text was updated successfully, but these errors were encountered: