Skip to content

Commit

Permalink
fix #1194
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed May 19, 2022
1 parent 8eeda5d commit 59e1e76
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions cl/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,42 @@ var x string = c.Str()
`)
}

func TestAutoPropMixedName_Issue1194(t *testing.T) {
gopClTest(t, `
type Point struct {
Min, Max int
}
type Obj struct {
bbox Point
}
func (o *Obj) Bbox() Point {
return o.bbox
}
func (o *Obj) Points() [2]int{
return [2]int{o.bbox.Min, o.bbox.Max}
}
`, `package main
type Point struct {
Min int
Max int
}
type Obj struct {
bbox Point
}
func (o *Obj) Bbox() Point {
return o.bbox
}
func (o *Obj) Points() [2]int {
return [2]int{o.bbox.Min, o.bbox.Max}
}
`)
}

func TestShiftUntypedInt_Issue1193(t *testing.T) {
gopClTest(t, `
func GetValue(shift uint) uint {
Expand Down

0 comments on commit 59e1e76

Please sign in to comment.