Skip to content

Commit

Permalink
clear up confusing if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Aug 28, 2024
1 parent 9fb6c1a commit 67d63ce
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,11 @@ func imports(m *schema.Module, aliasesMustBeExported bool) map[string]string {
}

case *schema.TypeAlias:
if !aliasesMustBeExported || n.IsExported() {
if importPath, dirName, ok := goImportForWidenedType(n); ok && extraImports[importPath] == optional.None[string]() {
extraImports[importPath] = dirName
}
if aliasesMustBeExported && !n.IsExported() {
return next()
}
if importPath, dirName, ok := goImportForWidenedType(n); ok && extraImports[importPath] == optional.None[string]() {
extraImports[importPath] = dirName
}
default:
}
Expand Down

0 comments on commit 67d63ce

Please sign in to comment.