From 97c03aaafbc4adbec3ece27ec5a23d435708bec3 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Thu, 20 Jun 2024 18:47:11 +0300 Subject: [PATCH] sema: fix typo --- std/jule/sema/directive.jule | 2 +- std/jule/sema/eval.jule | 42 +++++++++++++------------- std/jule/sema/scope.jule | 20 ++++++------- std/jule/sema/sema.jule | 58 ++++++++++++++++++------------------ std/jule/sema/symbol.jule | 2 +- std/jule/sema/type2.jule | 10 +++---- 6 files changed, 67 insertions(+), 67 deletions(-) diff --git a/std/jule/sema/directive.jule b/std/jule/sema/directive.jule index 3e0f205d9..12623395a 100644 --- a/std/jule/sema/directive.jule +++ b/std/jule/sema/directive.jule @@ -58,7 +58,7 @@ impl directiveChecker { if len(d.Args) == 0 { self.s.pushErr(d.Tag, LogMsg.MissingExpr) - self.s.pushSugggestion(LogMsg.ExpectedIdentifier) + self.s.pushSuggestion(LogMsg.ExpectedIdentifier) ret } else if len(d.Args) > 1 { self.s.pushErr(d.Args[1], LogMsg.ArgumentOverflow, "derive") diff --git a/std/jule/sema/eval.jule b/std/jule/sema/eval.jule index a161fb1ec..3c99e4bba 100644 --- a/std/jule/sema/eval.jule +++ b/std/jule/sema/eval.jule @@ -133,8 +133,8 @@ impl Eval { } // Push suggestion to last log. - fn pushSugggestion(mut self, fmt: LogMsg, args: ...any) { - self.s.pushSugggestion(fmt, args...) + fn pushSuggestion(mut self, fmt: LogMsg, args: ...any) { + self.s.pushSuggestion(fmt, args...) } fn allowBuiltin(mut self) { @@ -322,7 +322,7 @@ impl Eval { } else { let unsig = conv::ParseUint(lit, base, BitSize) else { self.pushErr(l.Token, LogMsg.InvalidNumericRange) - self.pushSugggestion(LogMsg.TryFloatingPoint) + self.pushSuggestion(LogMsg.TryFloatingPoint) use u64.Max } d.Constant = Const.NewU64(unsig) @@ -459,7 +459,7 @@ impl Eval { fn evalEnum(mut self, mut enm: &Enum, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(enm.Public, enm.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, enm.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } ret self._evalEnum(enm) @@ -477,7 +477,7 @@ impl Eval { fn evalTypeEnum(mut self, mut enm: &TypeEnum, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(enm.Public, enm.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, enm.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } ret self._evalTypeEnum(enm) @@ -500,7 +500,7 @@ impl Eval { fn evalStruct(mut self, mut s: &StructIns, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(s.Decl.Public, s.Decl.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, s.Decl.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } self.checkDeprecated(s.Decl.Directives, errorToken) @@ -528,14 +528,14 @@ impl Eval { } else { self.pushErr(tok, LogMsg.UsingDeprecated, d.Args[0].Kind) } - self.pushSugggestion(LogMsg.UseUnsafeForDeprecated) + self.pushSuggestion(LogMsg.UseUnsafeForDeprecated) } } fn evalFn(mut self, mut f: &Fn, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(f.Public, f.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, f.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } @@ -601,7 +601,7 @@ impl Eval { fn evalVar(mut self, mut v: &Var, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(v.Public, v.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, v.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } @@ -690,7 +690,7 @@ impl Eval { fn evalTypeAlias(mut self, mut ta: &TypeAlias, errorToken: &Token): &Data { if !self.s.isAccessibleDefine(ta.Public, ta.Token) { self.pushErr(errorToken, LogMsg.IdentIsNotAccessible, ta.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret nil } @@ -1686,7 +1686,7 @@ impl Eval { | d.Kind.Prim() != nil && d.Kind.Prim().IsAny(): if t.Enum() != nil { self.pushErr(errorToken, LogMsg.EnumCastedFromAny) - self.pushSugggestion(LogMsg.CastToEnumTypeInsteadOfEnum) + self.pushSuggestion(LogMsg.CastToEnumTypeInsteadOfEnum) } else if t.TypeEnum() != nil { self.pushErr(errorToken, LogMsg.EnumCastedFromAny) } @@ -1913,12 +1913,12 @@ impl Eval { if p.Decl.IsSelf() { if !p.Decl.IsRef() { self.pushErr(errorToken, LogMsg.ConcurrentCallWithSelfParam) - self.pushSugggestion(LogMsg.UseUnsafeJuleToCallCoSelf) + self.pushSuggestion(LogMsg.UseUnsafeJuleToCallCoSelf) } } if p.Decl.Reference { self.pushErr(errorToken, LogMsg.ConcurrentCallWithRefParam) - self.pushSugggestion(LogMsg.UseUnsafeJuleToCallCo) + self.pushSuggestion(LogMsg.UseUnsafeJuleToCallCo) ret } } @@ -1959,7 +1959,7 @@ impl Eval { } if self.isGlobal() && f.Decl.Exceptional { self.pushErr(fc.Token, LogMsg.ExceptionalAtGlobalScope) - self.pushSugggestion(LogMsg.WrapExceptional) + self.pushSuggestion(LogMsg.WrapExceptional) d = nil ret } @@ -2067,12 +2067,12 @@ impl Eval { if f.Decl.Exceptional { if fc.IsCo { self.s.pushErr(fc.Token, LogMsg.CoForExceptional) - self.s.pushSugggestion(LogMsg.HandleInFn) + self.s.pushSuggestion(LogMsg.HandleInFn) } match { | fc.Unhandled(): self.pushErr(fc.Token, LogMsg.UnhandledExceptional) - self.pushSugggestion(LogMsg.HandleExceptional) + self.pushSuggestion(LogMsg.HandleExceptional) | fc.Ignored(): // Ok. break @@ -2173,7 +2173,7 @@ impl Eval { if method != nil { if !self.s.isAccessibleDefine(method.Public, method.Token) { self.pushErr(ident, LogMsg.IdentIsNotAccessible, ident.Kind) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) } let mut ins = method.instance() @@ -2223,7 +2223,7 @@ impl Eval { if f != nil { if !self.s.isAccessibleDefine(f.Decl.Public, f.Decl.Token) { self.pushErr(si.Ident, LogMsg.IdentIsNotAccessible, f.Decl.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) } let mut model = &StructSubIdentExprModel{ @@ -2256,7 +2256,7 @@ impl Eval { } if !self.s.isAccessibleDefine(m.Public, m.Token) { self.pushErr(si.Ident, LogMsg.IdentIsNotAccessible, m.Ident) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) } if m.Params[0].IsRef() && !ref { @@ -3392,7 +3392,7 @@ impl binaryEval { } err: self.e.pushErr(self.op, LogMsg.AmperOpForEnum, enm.Ident, self.op.Kind) - self.e.pushSugggestion(LogMsg.DefineZeroDefaultToUseAmper) + self.e.pushSuggestion(LogMsg.DefineZeroDefaultToUseAmper) next: fall | TokenKind.Vline @@ -4108,7 +4108,7 @@ impl binaryEval { fn eval(mut self, mut &op: &BinopExpr): &Data { if op.Op.Kind == TokenKind.Eq { self.e.pushErr(op.Op, LogMsg.AssignInExpr) - self.e.pushSugggestion(LogMsg.UseImperative) + self.e.pushSuggestion(LogMsg.UseImperative) ret nil } diff --git a/std/jule/sema/scope.jule b/std/jule/sema/scope.jule index 397ac4d7e..e88093695 100644 --- a/std/jule/sema/scope.jule +++ b/std/jule/sema/scope.jule @@ -232,7 +232,7 @@ fn checkAssign(mut &s: &Sema, mut &left: &Data, mut right: &Data, op: &Token): ( match { | left.IsConst(): s.pushErr(op, LogMsg.AssignConst) - s.pushSugggestion(LogMsg.RemoveConstToAssign) + s.pushSuggestion(LogMsg.RemoveConstToAssign) ret false | !left.Lvalue: s.pushErr(op, LogMsg.AssignRequireLvalue) @@ -710,7 +710,7 @@ impl scopeChecker { if self.isDuplicatedIdent(uintptr(v), v.Ident) { self.s.pushErr(v.Token, LogMsg.DuplicatedIdent, v.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) self.stop() ret } @@ -727,7 +727,7 @@ impl scopeChecker { let mut ta = buildTypeAlias(decl) if self.isDuplicatedIdent(uintptr(ta), ta.Ident) { self.s.pushErr(ta.Token, LogMsg.DuplicatedIdent, ta.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) self.stop() ret } @@ -776,7 +776,7 @@ impl scopeChecker { let mut root = self.getRoot() if !root.owner.Decl.Exceptional { self.s.pushErr(err, LogMsg.ErrorWithNonExceptional) - self.s.pushSugggestion(LogMsg.DeclareExceptional) + self.s.pushSuggestion(LogMsg.DeclareExceptional) } m.Func = root.owner } @@ -956,7 +956,7 @@ impl scopeChecker { if kind.KeyA != nil { if !self.s.isFlag(SemaFlag.Shadowing) && self.isDuplicatedIdent(0, kind.KeyA.Ident) { self.s.pushErr(kind.KeyA.Token, LogMsg.DuplicatedIdent, kind.KeyA.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) } kind.KeyA.Scope = scope ssc.table.Vars = append(ssc.table.Vars, kind.KeyA) @@ -965,7 +965,7 @@ impl scopeChecker { if kind.KeyB != nil { if !self.s.isFlag(SemaFlag.Shadowing) && self.isDuplicatedIdent(0, kind.KeyB.Ident) { self.s.pushErr(kind.KeyB.Token, LogMsg.DuplicatedIdent, kind.KeyB.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) } kind.KeyB.Scope = scope ssc.table.Vars = append(ssc.table.Vars, kind.KeyB) @@ -1303,7 +1303,7 @@ impl scopeChecker { if a.Declarative && (lexpr.Reference || self.isNewAssignIdent(lexpr.Ident)) { if self.isDuplicatedIdent(0, lexpr.Ident) { self.s.pushErr(lexpr.Token, LogMsg.DuplicatedIdent, lexpr.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) self.stop() ret } @@ -1343,7 +1343,7 @@ impl scopeChecker { if lexpr.Mutable || lexpr.Reference { self.s.pushErr(lexpr.Token, LogMsg.DuplicatedIdent, lexpr.Ident) - self.s.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.s.pushSuggestion(LogMsg.RenameForAvoidDuplication) } if !checkAssign(self.s, l, r, a.Setter) { @@ -1462,7 +1462,7 @@ impl scopeChecker { if d.Decl { self.s.pushErr(e.Token, LogMsg.DeclFoundInsteadExpr) - self.s.pushSugggestion(LogMsg.UseTypeMatch) + self.s.pushSuggestion(LogMsg.UseTypeMatch) continue } @@ -1630,7 +1630,7 @@ impl scopeChecker { let mut case = unsafe { (*Case)(self.cse) } if unsafe { case.Next } == nil { self.s.pushErr(f.Token, LogMsg.FallthroughIntoFinalCase) - self.s.pushSugggestion(LogMsg.RemoveFallthroughFromFinalCase) + self.s.pushSuggestion(LogMsg.RemoveFallthroughFromFinalCase) ret } diff --git a/std/jule/sema/sema.jule b/std/jule/sema/sema.jule index 52fd649bd..ef0d25033 100644 --- a/std/jule/sema/sema.jule +++ b/std/jule/sema/sema.jule @@ -201,7 +201,7 @@ fn findFile(mut &files: []&SymbolTable, &handler: &File): &SymbolTable { ret nil } -unsafe fn pushSugggestion(mut log: *Log, fmt: LogMsg, args: ...any) { +unsafe fn pushSuggestion(mut log: *Log, fmt: LogMsg, args: ...any) { log.Suggestion = Logf(fmt, args...) } @@ -433,8 +433,8 @@ impl Sema { } // Push suggestion to last log. - fn pushSugggestion(mut self, fmt: LogMsg, args: ...any) { - unsafe { pushSugggestion(&self.errors[len(self.errors)-1], fmt, args...) } + fn pushSuggestion(mut self, fmt: LogMsg, args: ...any) { + unsafe { pushSuggestion(&self.errors[len(self.errors)-1], fmt, args...) } } // Reports whether define is accessible in the current package. @@ -521,7 +521,7 @@ impl Sema { fn checkImportSelection[T](mut self, &ident: &Token, &s: T): bool { if !self.isAccessibleDefine(s.Public, s.Token) { self.pushErr(ident, LogMsg.IdentIsNotAccessible, ident.Kind) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) ret false } const CppLinked = false // Exported defines cannot be linked. @@ -541,7 +541,7 @@ impl Sema { if self.isDuplicatedImportSelection(uintptr(imp), ident.Kind) { self.pushErr(ident, LogMsg.DuplicatedIdent, ident.Kind) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) ok = false continue } @@ -641,7 +641,7 @@ impl Sema { if self.isUseAliasDuplication(imp) { self.pushErr(imp.Token, LogMsg.DuplicatedUseAlias, imp.Alias) - self.pushSugggestion(LogMsg.RenameUseAliasAvoidDuplication) + self.pushSuggestion(LogMsg.RenameUseAliasAvoidDuplication) } if !imp.Duplicate { @@ -1149,7 +1149,7 @@ impl Sema { } if self.isDuplicatedIdent(uintptr(ta), ta.Ident, ta.CppLinked) { self.pushErr(ta.Token, LogMsg.DuplicatedIdent, ta.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } self.checkTypeAliasDeclKind(ta, self) } @@ -1179,7 +1179,7 @@ impl Sema { break } else if item.Ident == citem.Ident { self.pushErr(item.Token, LogMsg.DuplicatedIdent, item.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) break } } @@ -1298,7 +1298,7 @@ impl Sema { self.pushErr(e.Token, LogMsg.IgnoreIdent) } else if self.isDuplicatedIdent(uintptr(e), e.Ident, false) { self.pushErr(e.Token, LogMsg.DuplicatedIdent, e.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } if len(e.Items) == 0 { @@ -1343,7 +1343,7 @@ impl Sema { self.pushErr(e.Token, LogMsg.IgnoreIdent) } else if self.isDuplicatedIdent(uintptr(e), e.Ident, false) { self.pushErr(e.Token, LogMsg.DuplicatedIdent, e.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } if len(e.Items) == 0 { @@ -1419,7 +1419,7 @@ impl Sema { break duplicationLookup | g.Ident == ct.Ident: self.pushErr(g.Token, LogMsg.DuplicatedIdent, g.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) ok = false break duplicationLookup } @@ -1437,7 +1437,7 @@ impl Sema { if p.Ident == g.Ident { ok = false self.pushErr(p.Token, LogMsg.DuplicatedIdent, p.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) continue check } } @@ -1457,7 +1457,7 @@ impl Sema { | p.Ident == jp.Ident: ok = false self.pushErr(p.Token, LogMsg.DuplicatedIdent, p.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) continue check } } @@ -1503,7 +1503,7 @@ impl Sema { continue exist: self.pushErr(v, LogMsg.DuplicatedIdent, v.Kind) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) ok = false } @@ -1642,7 +1642,7 @@ impl Sema { if t.findMethodInherit(f.Ident) != nil { self.pushErr(f.Token, LogMsg.DuplicatedIdent, f.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) continue } @@ -1660,7 +1660,7 @@ impl Sema { break duplicateLookup | f.Ident == jf.Ident: self.pushErr(f.Token, LogMsg.DuplicatedIdent, f.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) break duplicateLookup } } @@ -1672,7 +1672,7 @@ impl Sema { self.pushErr(t.Token, LogMsg.IgnoreIdent) } else if self.isDuplicatedIdent(uintptr(t), t.Ident, false) { self.pushErr(t.Token, LogMsg.DuplicatedIdent, t.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } self.checkTraitDeclInherits(t) @@ -1752,7 +1752,7 @@ impl Sema { let mut base = base_t.Trait() if base == nil { self.pushErr(decl.Base.Token, LogMsg.ImplInvalidBase, base_t.Str()) - self.pushSugggestion(LogMsg.ExpectedTrait) + self.pushSuggestion(LogMsg.ExpectedTrait) ret } @@ -1763,7 +1763,7 @@ impl Sema { let mut destS = destT.Struct() if destS == nil { self.pushErr(decl.Dest.Token, LogMsg.ImplInvalidDest, destT.Str()) - self.pushSugggestion(LogMsg.ExpectedStruct) + self.pushSuggestion(LogMsg.ExpectedStruct) ret } @@ -1797,7 +1797,7 @@ impl Sema { let mut destS = destT.Struct() if destS == nil { self.pushErr(decl.Dest.Token, LogMsg.ImplInvalidDest, destT.Str()) - self.pushSugggestion(LogMsg.ExpectedStruct) + self.pushSuggestion(LogMsg.ExpectedStruct) ret } @@ -1860,14 +1860,14 @@ impl Sema { fn checkGlobalVarDecl(mut &self, mut &decl: &Var) { if self.isDuplicatedIdent(uintptr(decl), decl.Ident, decl.CppLinked) { self.pushErr(decl.Token, LogMsg.DuplicatedIdent, decl.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } if decl.CppLinked && decl.Constant { self.pushErr(decl.Token, LogMsg.CppLinkedVarIsConst) } if !decl.CppLinked && !decl.Constant && !decl.Statically { self.pushErr(decl.Token, LogMsg.GlobalNotStatic) - self.pushSugggestion(LogMsg.UseStaticKeywordToDef) + self.pushSuggestion(LogMsg.UseStaticKeywordToDef) } self.checkDirectives(decl.Directives, decl) self.checkVarDecl(decl, self) @@ -1926,7 +1926,7 @@ impl Sema { break } else if f.Ident == cf.Ident { self.pushErr(f.Token, LogMsg.DuplicatedIdent, f.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) ok = false } } @@ -1939,7 +1939,7 @@ impl Sema { self.pushErr(s.Token, LogMsg.IgnoreIdent) } else if self.isDuplicatedIdent(uintptr(s), s.Ident, s.CppLinked) { self.pushErr(s.Token, LogMsg.DuplicatedIdent, s.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } self.checkDirectives(s.Directives, s) @@ -1981,7 +1981,7 @@ impl Sema { } } self.pushErr(f.Token, LogMsg.DuplicatedIdent, f.Ident) - self.pushSugggestion(LogMsg.RenameForAvoidDuplication) + self.pushSuggestion(LogMsg.RenameForAvoidDuplication) } } @@ -2536,7 +2536,7 @@ impl Sema { fn checkTestFn(mut self, mut &f: &FnIns) { if f.Decl.Public { self.pushErr(f.Decl.Token, LogMsg.PubTestFn) - self.pushSugggestion(LogMsg.RemovePubModifier) + self.pushSuggestion(LogMsg.RemovePubModifier) ret } @@ -2547,21 +2547,21 @@ impl Sema { f.Decl.Params[0].Mutable || f.Decl.Params[0].Reference { self.pushErr(f.Decl.Token, LogMsg.WrongTestFnDecl) - self.pushSugggestion(LogMsg.UseExpectedTestFnDecl) + self.pushSuggestion(LogMsg.UseExpectedTestFnDecl) ret } let mut sptr = f.Params[0].Kind.Sptr() if sptr == nil { self.pushErr(f.Decl.Token, LogMsg.WrongTestFnDecl) - self.pushSugggestion(LogMsg.UseExpectedTestFnDecl) + self.pushSuggestion(LogMsg.UseExpectedTestFnDecl) ret } let s = sptr.Elem.Struct() if s == nil || !isStdPackage(s.Decl.Token.File.Path, "testing") { self.pushErr(f.Decl.Token, LogMsg.WrongTestFnDecl) - self.pushSugggestion(LogMsg.UseExpectedTestFnDecl) + self.pushSuggestion(LogMsg.UseExpectedTestFnDecl) ret } } diff --git a/std/jule/sema/symbol.jule b/std/jule/sema/symbol.jule index 249bbac33..37d2f6103 100644 --- a/std/jule/sema/symbol.jule +++ b/std/jule/sema/symbol.jule @@ -339,7 +339,7 @@ impl symbolBuilder { // Push suggestion to last log. fn pushSuggestion(mut self, fmt: LogMsg, args: ...any) { - unsafe { pushSugggestion(&self.errors[len(self.errors)-1], fmt, args...) } + unsafe { pushSuggestion(&self.errors[len(self.errors)-1], fmt, args...) } } fn checkCppUseDeclPath(mut self, &decl: &UseDecl, path: str): (ok: bool) { diff --git a/std/jule/sema/type2.jule b/std/jule/sema/type2.jule index 312065475..feb5f9cde 100644 --- a/std/jule/sema/type2.jule +++ b/std/jule/sema/type2.jule @@ -271,7 +271,7 @@ impl assignTypeChecker { valid = false | len(f.Decl.Generics) > 0 && len(f.Generics) == 0: self.pushErr(LogMsg.GenericedFnAsAnonFn) - self.s.pushSugggestion(LogMsg.InstantiateGenericFnToUseAsAnon) + self.s.pushSuggestion(LogMsg.InstantiateGenericFnToUseAsAnon) valid = false } | self.d.Kind.Tup() != nil: @@ -947,8 +947,8 @@ impl structLitChecker { } // Push suggestion to last log. - fn pushSugggestion(mut self, fmt: LogMsg, args: ...any) { - self.e.pushSugggestion(fmt, args...) + fn pushSuggestion(mut self, fmt: LogMsg, args: ...any) { + self.e.pushSuggestion(fmt, args...) } fn pushMatch(mut self, mut &f: &FieldIns, mut &d: &Data, mut &errorToken: &Token) { @@ -973,7 +973,7 @@ impl structLitChecker { } if !self.e.s.isAccessibleDefine(f.Decl.Public, f.Decl.Token) { self.pushErr(pair.Field, LogMsg.IdentIsNotAccessible, pair.Field.Kind) - self.pushSugggestion(LogMsg.MakePubToAccess) + self.pushSuggestion(LogMsg.MakePubToAccess) } // Check duplications. @@ -1057,7 +1057,7 @@ impl structLitChecker { if !self.e.s.isAccessibleDefine(field.Decl.Public, field.Decl.Token) { self.pushErr(self.errorToken, LogMsg.StructureLitWithPrivFields) - self.pushSugggestion(LogMsg.UseFieldPairToInstantiate) + self.pushSuggestion(LogMsg.UseFieldPairToInstantiate) ret }