mirror of
https://github.com/MorizzG/rlox.git
synced 2025-12-06 12:22:42 +00:00
13 lines
263 B
Lox
13 lines
263 B
Lox
// Bound methods have identity equality.
|
|
class Foo {
|
|
method() {}
|
|
}
|
|
|
|
var foo = Foo();
|
|
var fooMethod = foo.method;
|
|
|
|
// Same bound method.
|
|
print fooMethod == fooMethod; // expect: true
|
|
|
|
// Different closurizations.
|
|
print foo.method == foo.method; // expect: false
|