ajwang / groovypptest

Automatically exported from code.google.com/p/groovypptest
0 stars 0 forks source link

Code magically getting mixed-in #282

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In the code below, the methods of Foo and Bar classes are automatically getting 
mixed into ArrayList class - without any sort of attempt on the developer's 
part to do so.

--------------------------------------------------------------------
assert [0, 1].roshan() == [1, 0]
assert [0, 1].dawrani() == [1, 0]

class Foo {
    static roshan(ArrayList list) {
        [list[1], list[0]]
    }
}

class Bar {
    static dawrani(ArrayList list) {
        [list[1], list[0]]
    }
}
--------------------------------------------------------------------

Original issue reported on code.google.com by roshanda...@gmail.com on 31 Jul 2010 at 11:10

GoogleCodeExporter commented 8 years ago
This is partly implemented feature of compile time categories

Original comment by alex.tka...@gmail.com on 11 Dec 2010 at 2:27