Skip to content

Commit

Permalink
sema: fix cycle error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 14, 2024
1 parent 11abad5 commit 83d9603
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions std/jule/sema/sema.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2094,11 +2094,11 @@ impl Sema {
fn pushCycleError(self, &st1: str, &st2: str, mut &message: StrBuilder) {
const Padding = 7
refersTo := Logf(LogMsg.RefersTo, st1, st2)
mut buf := unsafe { message.Buf() }
m := message.Str()
message.WriteStr(strings::Repeat(" ", Padding))
message.WriteStr(refersTo)
message.WriteByte('\n')
message.Write(buf)
message.WriteStr(m)
}

fn checkCrossCycle(self, &st1: &Struct, &st2: &Struct, mut &message: StrBuilder): bool {
Expand Down
4 changes: 2 additions & 2 deletions std/jule/sema/symbol.jule
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,11 @@ impl symbolBuilder {
LogMsg.RefersTo,
self.getAsLinkPath(sb.table.File.Dir()),
self.getAsLinkPath(path))
buf := unsafe { message.Buf() }
m := message.Str()
message.WriteStr(strings::Repeat(" ", Padding))
message.WriteStr(refersTo)
message.WriteByte('\n')
message.Write(buf)
message.WriteStr(m)
}

fn pushCrossCycleError(mut &self, &target: &symbolBuilder, &imp: &ImportInfo, &errorToken: &Token) {
Expand Down
4 changes: 2 additions & 2 deletions std/jule/sema/type.jule
Original file line number Diff line number Diff line change
Expand Up @@ -850,14 +850,14 @@ impl typeChecker {
ret ""
}
}
buf := unsafe { message.Buf() }
m := message.Str()
def1Ident := getIdent(def1)
def2Ident := getIdent(def2)
refersTo := Logf(LogMsg.RefersTo, def1Ident, def2Ident)
message.WriteStr(strings::Repeat(" ", Padding))
message.WriteStr(refersTo)
message.WriteByte('\n')
message.Write(buf)
message.WriteStr(m)
}

fn checkCrossCycle(self, decl: any, mut &message: StrBuilder): bool {
Expand Down

0 comments on commit 83d9603

Please sign in to comment.