mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Resolved #38
This commit is contained in:
20
scripts/test/dot-assignments-bugfix.toy
Normal file
20
scripts/test/dot-assignments-bugfix.toy
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
|
||||
NOTES: For some reason, this code results in the error:
|
||||
Undeclared variable "inner"
|
||||
|
||||
It only occurs under these very specific conditions.
|
||||
|
||||
It appears to be a compiler issue, see issue #38 for more info.
|
||||
|
||||
*/
|
||||
|
||||
fn _getValue(self) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var cache;
|
||||
cache = 42.getValue(); //assignment, rather than declaration, allows the bug
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user