basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

false `reportInvalidTypeVarUse` when return type is inferred

Open KotlinIsland opened this issue 5 months ago • 4 comments

Description

Code sample in basedpyright playground

def f21[T](t: T):
    return t

KotlinIsland avatar Sep 22 '25 01:09 KotlinIsland

lol i was going to check this yesterday because i suspected this was an issue but i completely forgot. thanks

DetachHead avatar Sep 22 '25 03:09 DetachHead

It seems that this issue hasn't been reported upstream. Would you mind if I report it?

Ha-limLee avatar Nov 09 '25 07:11 Ha-limLee

We don't mind, go ahead

DetachHead avatar Nov 09 '25 18:11 DetachHead

This has been rejected upstream. see: https://github.com/microsoft/pyright/discussions/11102.

Ha-limLee avatar Nov 14 '25 09:11 Ha-limLee