-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
bugcrashFailing compile-time asserts, unhandled exceptions, or generated C code that's blowing up.Failing compile-time asserts, unhandled exceptions, or generated C code that's blowing up.
Description
import functools
class Foo:
def f(self, x: int) -> int:
return x
class Bar(Foo):
@functools.lru_cache()
def f(self, x: int) -> int:
return x + 1
crashes with
File "/home/sully/src/mypy/mypyc/irbuild/function.py", line 379, in handle_ext_method
and not is_same_method_signature(class_ir.method_decls[name].sig,
over.py:8: KeyError: 'f'
Typically we don't put decorated functions in the vtable since we invoke them through the API. We should generate native glue wrappers that delegate to the decorated callable object, like we do when allowing interpreted subclasses.
(If we implement #481 (storing decorated functions in globals for faster lookup), we should just always use native wrappers to save a dict lookup.)
Metadata
Metadata
Assignees
Labels
bugcrashFailing compile-time asserts, unhandled exceptions, or generated C code that's blowing up.Failing compile-time asserts, unhandled exceptions, or generated C code that's blowing up.