Skip to content

No argument errors reported when a class is used as a decorator #2232

@MeGaGiGaGon

Description

@MeGaGiGaGon

Summary

Found this while messing around, if using a class as a decorator ty does not report any errors.
https://play.ty.dev/d188d05e-e59b-44f7-8085-f180fd667424

class A: ...

@A  # Should have a too-many-positional-arguments error
def foo(): ...

@int  # Should have a invalid-argument-type error
def bar(): ...

Version

ty 0.0.7 (cf82a04 2025-12-24) playground 9693375e1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions