[fine] No methods assigned to variables!

This commit is contained in:
John Doty 2024-01-24 09:11:55 -08:00
parent 0c69758b11
commit bc57978dda
2 changed files with 22 additions and 1 deletions

View file

@ -0,0 +1,11 @@
class Foo {
fun bar(self) {}
}
fun test() {
let obj = new Foo {};
let f = obj.bar;
}
// @expect-errors:
// | 7:6: methods cannot be assigned to variables