blob: 9b2b90c12ee0b696b16e0057e1f5337d402a8173 [file] [log] [blame]
-- suggestedfix_typeparams_11_40 --
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{
foo: 0,
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
var _ = basicStructWithTypeParams[T]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
_ = x
}
-- suggestedfix_typeparams_14_40 --
//go:build go1.18
// +build go1.18
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{
foo: 0,
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
_ = x
}
-- suggestedfix_typeparams_18_49 --
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{
foo: "",
bar: 0,
} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
var _ = basicStructWithTypeParams[T]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
_ = x
}
-- suggestedfix_typeparams_20_49 --
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = basicStructWithTypeParams{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{
foo: "",
bar: 0,
} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
_ = x
}
-- suggestedfix_typeparams_21_49 --
//go:build go1.18
// +build go1.18
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{
foo: "",
bar: 0,
} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
_ = x
}
-- suggestedfix_typeparams_22_1 --
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
foo: 0,
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
var _ = basicStructWithTypeParams[T]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
_ = x
}
-- suggestedfix_typeparams_24_1 --
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = basicStructWithTypeParams{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
foo: 0,
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
_ = x
}
-- suggestedfix_typeparams_25_1 --
//go:build go1.18
// +build go1.18
package fillstruct
type emptyStructWithTypeParams[A any] struct{}
var _ = emptyStructWithTypeParams[int]{}
type basicStructWithTypeParams[T any] struct {
foo T
}
var _ = basicStructWithTypeParams[int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
type twoArgStructWithTypeParams[F, B any] struct {
foo F
bar B
}
var _ = twoArgStructWithTypeParams[string, int]{} //@suggestedfix("}", "refactor.rewrite", "Fill")
var _ = twoArgStructWithTypeParams[int, string]{
foo: 0,
bar: "bar",
} //@suggestedfix("}", "refactor.rewrite", "Fill")
type nestedStructWithTypeParams struct {
bar string
basic basicStructWithTypeParams[int]
}
var _ = nestedStructWithTypeParams{}
func _[T any]() {
type S struct{ t T }
x := S{}
_ = x
}