There's a related "problem" that may or may not be worth coding against. While the compiler will pick and error duplicate types with different signatures
B4X:
[COLOR="Blue"] Mod1 Mod2
Type a (a As Int) Type a (b As String)[/COLOR]
It will not error when the type signatures are the same, even if the internal types are different. The compiled code however will always use the first definition that it encountered.
B4X:
[COLOR="Blue"] Mod1 Mod2
Type a (a As Int) Type a (a As String)[/COLOR]
Thank you. It will be fixed.
This error should not stop you, as the modules depend on each other, for now you need to declare the dependent types in the same module.
Compiling code. Error
Error parsing program.
Error description: Unknown type: aaa
Are you missing a library reference?
Occurred on line: 6
Type zzz (a As aaa)
Is this fixed yet or is there a workaround? I need to create a module containing shared code but can't get the existing modules to recognise it.
B4X:
'Module SharedStuff
Sub Process_Globals
Type MYTYPE(a As Int, b As string)
End Sub
'end module sharedstuff
'Activity Uses_SharedStuff
Private Sub Mysub()
Dim param As SharedStuff.MYTYPE
'.....
End Sub
Parsing code. Error
Error parsing program.
Error description: Unknown type: sharedstuff
Are you missing a library reference?
Occurred on line: 1228
Dim param As SharedStuff.MYTYPE