Get static methods fully working.

They are compiled as local variables defined in an implicit
scope surrounding the class. This has the right semantics and,
better, means that there's no VM support needed for them.

They're purely syntax sugar.
This commit is contained in:
Bob Nystrom
2014-01-19 13:01:51 -08:00
parent 2a68c8ee1d
commit 83b5968340
15 changed files with 307 additions and 81 deletions
+5
View File
@@ -0,0 +1,5 @@
class Foo {
static bar {
fn _field = "wat" // expect error
}
}