Skip to content

Commit 3b2345c

Browse files
committed
typos
Change-Id: Ifb8d5e9711fe9820b382c6cb4271bb89b11997ba
1 parent 9dcd042 commit 3b2345c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/cmd/compile/internal/devirtualize/devirtualize.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,23 +180,23 @@ func StaticCall(call *ir.CallExpr) {
180180
// Returns nil when the concrete type could not be determined, or when there are multiple
181181
// (different) types assigned to an interface.
182182
func concreteType(n ir.Node) (typ *types.Type) {
183-
var assignements map[*ir.Name][]valOrTyp
183+
var assignments map[*ir.Name][]valOrTyp
184184
typ, isNil := concreteType1(n, make(map[*ir.Name]*types.Type), func(n *ir.Name) []valOrTyp {
185-
if assignements == nil {
186-
assignements = make(map[*ir.Name][]valOrTyp)
185+
if assignments == nil {
186+
assignments = make(map[*ir.Name][]valOrTyp)
187187
if n.Curfn == nil {
188188
base.Fatalf("n.Curfn == nil: %v", n)
189189
}
190190
fun := n.Curfn
191191
for fun.ClosureParent != nil {
192192
fun = fun.ClosureParent
193193
}
194-
assignements = ifaceAssignments(fun)
194+
assignments = ifaceAssignments(fun)
195195
}
196196
if !n.Type().IsInterface() {
197-
base.Fatalf("name passed to getAssignements is not of an interface type: %v", n.Type())
197+
base.Fatalf("name passed to getAssignments is not of an interface type: %v", n.Type())
198198
}
199-
return assignements[n]
199+
return assignments[n]
200200
})
201201
if isNil && typ != nil {
202202
base.Fatalf("typ = %v; want = <nil>", typ)
@@ -207,7 +207,7 @@ func concreteType(n ir.Node) (typ *types.Type) {
207207
return typ
208208
}
209209

210-
func concreteType1(n ir.Node, analyzed map[*ir.Name]*types.Type, getAssignements func(*ir.Name) []valOrTyp) (out *types.Type, isNil bool) {
210+
func concreteType1(n ir.Node, analyzed map[*ir.Name]*types.Type, getAssignments func(*ir.Name) []valOrTyp) (out *types.Type, isNil bool) {
211211
for {
212212
if !n.Type().IsInterface() {
213213
return n.Type(), false
@@ -276,19 +276,19 @@ func concreteType1(n ir.Node, analyzed map[*ir.Name]*types.Type, getAssignements
276276
// executes) will get a nil (from the map lookup above), where we could determine the type.
277277
analyzed[name] = nil
278278

279-
assignements := getAssignements(name)
280-
if len(assignements) == 0 {
279+
assignments := getAssignments(name)
280+
if len(assignments) == 0 {
281281
// Variable either declared with zero value, or only assigned
282-
// with nil (getAssignements does not return such assignements).
282+
// with nil (getAssignements does not return such assignments).
283283
return nil, true
284284
}
285285

286286
var typ *types.Type
287-
for _, v := range assignements {
287+
for _, v := range assignments {
288288
t := v.typ
289289
if v.node != nil {
290290
var isNil bool
291-
t, isNil = concreteType1(v.node, analyzed, getAssignements)
291+
t, isNil = concreteType1(v.node, analyzed, getAssignments)
292292
if isNil {
293293
if t != nil {
294294
base.Fatalf("t = %v; want = <nil>", t)

0 commit comments

Comments
 (0)