[fine] No methods assigned to variables!
This commit is contained in:
parent
0c69758b11
commit
bc57978dda
2 changed files with 22 additions and 1 deletions
11
fine/tests/expression/errors/no_method_variables.fine
Normal file
11
fine/tests/expression/errors/no_method_variables.fine
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue