ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

Callable identity error when used in Sequence #493

Closed sgalles closed 9 years ago

sgalles commented 9 years ago

This code prints out falseinstead of true

shared void run() {
    value j = void(){};
    value m =  [j,j];
    print(m[0] == m[1]); // false instead of true
} 
chochos commented 9 years ago

Each reference to j is boxed separately, so they're different identities. But it can be fixed.

chochos commented 9 years ago

As of ceylon/ceylon.language#716 Callable.equals always returns false.