Open
Description
RustPython gets panicked when running the following code. It seems that the annotation cannot be handled well with beartype.
test.py
from beartype import beartype
from beartype.vale import IsDependent
import numpy as np
@beartype
def spam(first: np.ndarray, second: np.ndarray) -> Annotated[
np.ndarray, IsDependent[lambda result, first, second:
result.shape == (first.shape[0], second.shape[1])]]:
"""Matrix multiplication"""
return a @ b
Crash message:
thread 'main' panicked at 'The symbol must be present in the symbol table, even when it is undefined in python.', compiler/codegen/src/compile.rs:478:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Environment:
Ubuntu 18.04
rustpython v0.2.0 #6c6290d
Metadata
Metadata
Assignees
Labels
Area: compilerArea: compiler