new language feature: explicit 'import system' statements are allowed

This commit is contained in:
Andreas Rumpf 2016-07-07 01:02:12 +02:00
commit e9eab32e54
5 changed files with 37 additions and 5 deletions

View file

@ -184,8 +184,8 @@ proc importModule*(s: PSym, fileIdx: int32): PSym {.procvar.} =
# this is called by the semantic checking phase
result = compileModule(fileIdx, {})
if optCaasEnabled in gGlobalOptions: addDep(s, fileIdx)
if sfSystemModule in result.flags:
localError(result.info, errAttemptToRedefine, result.name.s)
#if sfSystemModule in result.flags:
# localError(result.info, errAttemptToRedefine, result.name.s)
# restore the notes for outer module:
gNotes = if s.owner.id == gMainPackageId: gMainPackageNotes
else: ForeignPackageNotes