Import Problems: Is it a Bug???

Monkey Forums/Monkey Programming/Import Problems: Is it a Bug???

maverick69(Posted 2011) [#1]
Hello monks ;)

I have some problems with Imports resulting in error messages like

"Duplicate identifier 'ClassName' found in module 'classname' and module 'classname'"

Here is an example:

File: main.monkey
Import src.gfx.gfx

Function Main()
	Gfx.GfxHello()
End


File: src/testclass.monkey
Import src.gfx.gfx

Class TestClass
	Function PrintSomething()
		Print "Hello from TestClass"		
	End
	
	Function GetGfx:Gfx()
		Return New Gfx()
	End
End


File: src/gfx/gfx.monkey
Import src.testclass

Class Gfx
	Function GfxHello()
		Print "Hello from Gfx"
		TestClass.PrintSomething()
	End
End


This worked in older version of monkey! Any ideas if I'm doing something wrong. Or is it a monkey-bug?


maverick69(Posted 2011) [#2]
Strange. On my windows pc it works. On mac the compile error occurs. Any ideas?