pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

The current class isn't generic with respect to the type variable

Open samuela opened this issue 6 years ago • 1 comments

I have a bit of code

State = TypeVar("State")

class LoopState(Generic[State], NamedTuple):
  blah: int
  state: State

which works great. But if I simply reorder:

class LoopState(NamedTuple, Generic[State]):
  blah: int
  state: State

I get an error:

Invalid type variable [34]: The current class isn't generic with respect to the type variable `Variable[State]`.

Info:

research 🔥 pipenv run pip freeze | grep pyre
pyre-check==0.0.31
pyre-extensions==0.0.15

samuela avatar Sep 30 '19 23:09 samuela

@samuela thanks for reporting! @mrkmndz are you familiar with why this might be happening?

maggiemoss avatar Oct 01 '19 00:10 maggiemoss