aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/craftinginterpreters/lox/LoxInstance.java
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-04-18 17:25:03 -0700
committerGravatar Tom Willemse2021-04-18 17:25:03 -0700
commit21a58ffb202531d6ac74702648ad1c168f279a6d (patch)
treeed7f1b3e1b38242602ba08207d033dd485865d77 /src/com/craftinginterpreters/lox/LoxInstance.java
parent591caeb216128675ce6b8ddafccb09df7f522145 (diff)
downloadcrafting-interpreters-21a58ffb202531d6ac74702648ad1c168f279a6d.tar.gz
crafting-interpreters-21a58ffb202531d6ac74702648ad1c168f279a6d.zip
12.5 This
Diffstat (limited to 'src/com/craftinginterpreters/lox/LoxInstance.java')
-rw-r--r--src/com/craftinginterpreters/lox/LoxInstance.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/craftinginterpreters/lox/LoxInstance.java b/src/com/craftinginterpreters/lox/LoxInstance.java
index 20accaa..64989e0 100644
--- a/src/com/craftinginterpreters/lox/LoxInstance.java
+++ b/src/com/craftinginterpreters/lox/LoxInstance.java
@@ -18,7 +18,7 @@ class LoxInstance {
LoxFunction method = klass.findMethod(name.lexeme);
if (method != null)
- return method;
+ return method.bind(this);
throw new RuntimeError(name, "Undefined proprety '" + name.lexeme + "'.");
}