Skip to content

Commit

Permalink
all: fix spelling
Browse files Browse the repository at this point in the history
Change-Id: Iad14571c3e19b01740cd744f0b3025b3e2f1cb72
GitHub-Last-Rev: e806401
GitHub-Pull-Request: #44685
Reviewed-on: https://go-review.googlesource.com/c/go/+/297409
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
jbampton authored and ianlancetaylor committed Mar 2, 2021
1 parent a6eeb4a commit 580636a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/cmd/compile/internal/ir/visit.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ package ir
//
// var do func(ir.Node) bool
// do = func(x ir.Node) bool {
// ... processing BEFORE visting children ...
// ... processing BEFORE visiting children ...
// if ... should visit children ... {
// ir.DoChildren(x, do)
// ... processing AFTER visting children ...
// ... processing AFTER visiting children ...
// }
// if ... should stop parent DoChildren call from visiting siblings ... {
// return true
Expand All @@ -43,11 +43,11 @@ package ir
//
// var do func(ir.Node) bool
// do = func(x ir.Node) bool {
// ... processing BEFORE visting children ...
// ... processing BEFORE visiting children ...
// if ... should visit children ... {
// ir.DoChildren(x, do)
// }
// ... processing AFTER visting children ...
// ... processing AFTER visiting children ...
// return false
// }
// do(root)
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/types2/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (check *Checker) funcInst(x *operand, inst *syntax.IndexExpr) {
x.expr = inst
return
}
// all type arguments were inferred sucessfully
// all type arguments were inferred successfully
if debug {
for _, targ := range targs {
assert(targ != nil)
Expand Down Expand Up @@ -402,7 +402,7 @@ func (check *Checker) arguments(call *syntax.CallExpr, sig *Signature, args []*o
return
}
}
// all type arguments were inferred sucessfully
// all type arguments were inferred successfully
if debug {
for _, targ := range targs {
assert(targ != nil)
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/types2/typexpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *syntax.Field, tparams []
}

// goTypeName returns the Go type name for typ and
// removes any occurences of "types." from that name.
// removes any occurrences of "types." from that name.
func goTypeName(typ Type) string {
return strings.Replace(fmt.Sprintf("%T", typ), "types.", "", -1) // strings.ReplaceAll is not available in Go 1.4
}
Expand Down Expand Up @@ -710,7 +710,7 @@ func (check *Checker) arrayLength(e syntax.Expr) int64 {
}

// typeList provides the list of types corresponding to the incoming expression list.
// If an error occured, the result is nil, but all list elements were type-checked.
// If an error occurred, the result is nil, but all list elements were type-checked.
func (check *Checker) typeList(list []syntax.Expr) []Type {
res := make([]Type, len(list)) // res != nil even if len(list) == 0
for i, x := range list {
Expand Down
4 changes: 2 additions & 2 deletions src/go/types/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (check *Checker) funcInst(x *operand, inst *ast.IndexExpr) {
x.expr = inst
return
}
// all type arguments were inferred sucessfully
// all type arguments were inferred successfully
if debug {
for _, targ := range targs {
assert(targ != nil)
Expand Down Expand Up @@ -404,7 +404,7 @@ func (check *Checker) arguments(call *ast.CallExpr, sig *Signature, args []*oper
return
}
}
// all type arguments were inferred sucessfully
// all type arguments were inferred successfully
if debug {
for _, targ := range targs {
assert(targ != nil)
Expand Down
2 changes: 1 addition & 1 deletion src/go/types/examples/types.go2
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func _() {

// We accept parenthesized embedded struct fields so we can distinguish between
// a named field with a parenthesized type foo (T) and an embedded parameterized
// type (foo(T)), similarly to interace embedding.
// type (foo(T)), similarly to interface embedding.
// They still need to be valid embedded types after the parentheses are stripped
// (i.e., in contrast to interfaces, we cannot embed a struct literal). The name
// of the embedded field is derived as before, after stripping parentheses.
Expand Down
4 changes: 2 additions & 2 deletions src/go/types/typexpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (check *Checker) funcType(sig *Signature, recvPar *ast.FieldList, ftyp *ast
}

// goTypeName returns the Go type name for typ and
// removes any occurences of "types." from that name.
// removes any occurrences of "types." from that name.
func goTypeName(typ Type) string {
return strings.ReplaceAll(fmt.Sprintf("%T", typ), "types.", "")
}
Expand Down Expand Up @@ -674,7 +674,7 @@ func (check *Checker) arrayLength(e ast.Expr) int64 {
}

// typeList provides the list of types corresponding to the incoming expression list.
// If an error occured, the result is nil, but all list elements were type-checked.
// If an error occurred, the result is nil, but all list elements were type-checked.
func (check *Checker) typeList(list []ast.Expr) []Type {
res := make([]Type, len(list)) // res != nil even if len(list) == 0
for i, x := range list {
Expand Down
2 changes: 1 addition & 1 deletion src/reflect/abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func newAbiDesc(t *funcType, rcvr *rtype) abiDesc {
// Stack-assigned return values do not share
// space with arguments like they do with registers,
// so we need to inject a stack offset here.
// Fake it by artifically extending stackBytes by
// Fake it by artificially extending stackBytes by
// the return offset.
out.stackBytes = retOffset
for i, res := range t.out() {
Expand Down
2 changes: 1 addition & 1 deletion src/syscall/exec_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestChangingProcessParent(t *testing.T) {
}
childOutput, err = ioutil.ReadFile(childDumpPath)
if err != nil {
t.Fatalf("reading child ouput failed: %v", err)
t.Fatalf("reading child output failed: %v", err)
}
if got, want := string(childOutput), fmt.Sprintf("%d", parent.Process.Pid); got != want {
t.Fatalf("child output: want %q, got %q", want, got)
Expand Down
2 changes: 1 addition & 1 deletion test/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ func (t *test) run() {
// up and running against the existing test cases. The explicitly
// listed files don't pass yet, usually because the error messages
// are slightly different (this list is not complete). Any errorcheck
// tests that require output from analysis phases past intial type-
// tests that require output from analysis phases past initial type-
// checking are also excluded since these phases are not running yet.
// We can get rid of this code once types2 is fully plugged in.

Expand Down

0 comments on commit 580636a

Please sign in to comment.