Merge branch 'master' into 1.15
This commit is contained in:
commit
f5ffdb6eb9
1 file changed
+4
-1
@@ -1,10 +1,13 @@
|
|||||||
package carpet.script.value;
|
package carpet.script.value;
|
||||||
|
|
||||||
|
import carpet.script.exception.InternalExpressionException;
|
||||||
|
|
||||||
public class GlobalValue extends Value
|
public class GlobalValue extends Value
|
||||||
{
|
{
|
||||||
public GlobalValue(Value variable)
|
public GlobalValue(Value variable)
|
||||||
{
|
{
|
||||||
variable.assertAssignable();
|
if (variable.boundVariable == null)
|
||||||
|
throw new InternalExpressionException("You can only borrow variables from the outer scope");
|
||||||
this.boundVariable = variable.boundVariable;
|
this.boundVariable = variable.boundVariable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user