facebookincubator / cinder

Cinder is Meta's internal performance-oriented production version of CPython.
https://trycinder.com
Other
3.49k stars 121 forks source link

Subclassing a final class should give a type error #54

Closed bennn closed 2 years ago

bennn commented 2 years ago

What program did you run?

from __static__ import int64
class D(int64): pass

What happened?

No error

What should have happened?

Type error because int64 is final.

Currently D(1) gives a compiler assertion error. That's good, but it'd be more helpful to reject the class definition in the first place.