Reflection breaks Stack?

Monkey Forums/Monkey Programming/Reflection breaks Stack?

Difference(Posted 2012) [#1]
When trying to compile, I get an "Arrays cannot be compared"

In stack.monkey, in the method:


Method Equals?( lhs:T,rhs:T )
Return lhs=rhs
End

as a result of a RemoveEach(objectinstance) on a Stack Created with

Field mystack:Stack<MyObject> = New Stack<MyObject>


I haven't been able to make a small example, so I'm posting here before trying anything else. Any advice?

MyObject Class is not an array on does not extend anything.


devolonter(Posted 2012) [#2]
I confirm!

I think the problem is that in the Equals method there is no check for arrays.
[monkeycode]
Method Equals?( lhs:T,rhs:T )
Return lhs=rhs
End
[/monkeycode]

Maybe someone should send a bug report?


Nobuyuki(Posted 2012) [#3]
do it in the bug reports forum doooood

(or have a mod move it, if it is indeed a bug)


Skn3(Posted 2012) [#4]
Erm I just got this today on latest version 61b. Has this not been fixed?


Skn3(Posted 2012) [#5]
Nm it was me being dumb!