Interpreter - Working bound methods
This commit is contained in:
parent
542bc56aad
commit
3e4aea0d78
3 changed files with 39 additions and 6 deletions
src/interpreter
|
@ -539,7 +539,7 @@ impl ExprNode {
|
|||
) -> InterpreterResult {
|
||||
let instance = get_expr.instance.interpret(itpr_state)?.result();
|
||||
instance.with_instance(
|
||||
|instance| instance.get(&get_expr.name).map(|v| v.into()),
|
||||
|inst| inst.get(&instance, &get_expr.name).map(|v| v.into()),
|
||||
|| error(&get_expr.name, "only instances have properties"),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue