// "initorder.go": fixErrErrorfCall, // disabled for now due to unresolved error_ use implications for gopls
"instantiate.go": func(f *ast.File) { fixTokenPos(f); fixCheckErrorfCall(f) },
"instantiate_test.go": func(f *ast.File) { renameImportPath(f, `"cmd/compile/internal/types2"->"go/types"`) },
- "lookup.go": func(f *ast.File) { fixTokenPos(f) },
- "main_test.go": nil,
- "map.go": nil,
+ "literals.go": func(f *ast.File) {
+ renameImportPath(f, `"cmd/compile/internal/syntax"->"go/ast"`)
+ renameSelectorExprs(f, "syntax.Name->ast.Ident", "key.Value->key.Name", "atyp.Elem->atyp.Elt") // must happen before renaming identifiers
+ renameIdents(f, "syntax->ast")
+ renameSelectors(f, "ElemList->Elts")
+ },
+ "lookup.go": func(f *ast.File) { fixTokenPos(f) },
+ "main_test.go": nil,
+ "map.go": nil,
"mono.go": func(f *ast.File) {
fixTokenPos(f)
insertImportPath(f, `"go/ast"`)
+// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/literals.go
+
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
check.errorf(kv, InvalidLitField, "invalid field name %s in struct literal", kv.Key)
continue
}
- i := fieldIndex(utyp.fields, check.pkg, key.Name, false)
+ i := fieldIndex(fields, check.pkg, key.Name, false)
if i < 0 {
var alt Object
if j := fieldIndex(fields, check.pkg, key.Name, true); j >= 0 {
// i < len(fields)
fld := fields[i]
if !fld.Exported() && fld.pkg != check.pkg {
- check.errorf(x,
- UnexportedLitField,
- "implicit assignment to unexported field %s in struct literal of type %s", fld.name, base)
+ check.errorf(x, UnexportedLitField, "implicit assignment to unexported field %s in struct literal of type %s", fld.name, base)
continue
}
etyp := fld.typ