Skip to content

Commit

Permalink
sema: fix use declaration to root module may cause crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jan 7, 2025
1 parent c5d59ec commit 78b056e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion std/jule/sema/sym.jule
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ impl symBuilder {

root, _ := filepath::Abs(self.importer.GetModPath())
path = path[len(root):]
if path[0] == filepath::Separator {
if len(path) == 0 {
path = filepath::Base(root)
} else if path[0] == filepath::Separator {
path = path[1:]
}
sb.WriteByte('"')!
Expand Down

0 comments on commit 78b056e

Please sign in to comment.