If there's a module-import line that's not inside a module, the error message generated is confusing. It says "Duplicate module name: <ModuleName>" instead of something more meaningful like "Can't import module <ModuleName> when not inside of a module."
Here's some sample code that produces the confusing error message:
module Mod1
{
type IntRenamed = int
}
import opened Mod1
Here's some sample code that produces the confusing error message:
module Mod1
{
type IntRenamed = int
}
import opened Mod1