Node-related bug?
Monkey Forums/Monkey Bug Reports/Node-related bug?
| ||
(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: |
| ||
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. |
| ||
Ah, okay. Thanks. |
| ||
The compiler's automatic type inference is clever enough to know. :) |