Node-related bug?

Monkey Forums/Monkey Bug Reports/Node-related bug?

impixi(Posted 2014) [#1]
(V81b)

The following syntax causes a compiler error: "Duplicate identifier 'Node' found in module 'map' and module 'list'."
Local myn:Node<String> = myStringList.AddFirst("Test")


And yet this compiles okay:
Local myn := myStringList.AddFirst("Test")


The explicit type declaration shouldn't cause such an error, um, should it?

Runnable example:



marksibly(Posted 2014) [#2]
It's 'coz there's a node class in both the list and map modules, so you need to go:

Local myn:list.Node<String>=...

This is pretty dumb - I didn't realise node was gonna be used publicly when I wrote it. If I had, I would have used ListNode and MapNode instead.


impixi(Posted 2014) [#3]
Ah, okay. Thanks.


impixi(Posted 2014) [#4]
The compiler's automatic type inference is clever enough to know. :)