Source file
test/fixedbugs/issue63490.go
1
2
3
4
5
6
7 package main
8
9 type ResourceFunc struct {
10 junk [8]int
11 base assignmentBaseResource
12 }
13
14 type SubscriptionAssignmentResource struct {
15 base assignmentBaseResource
16 }
17
18 type assignmentBaseResource struct{}
19
20
21 func (a assignmentBaseResource) f(s string) ResourceFunc {
22 println(s)
23 return ResourceFunc{}
24 }
25
26
27 func (r SubscriptionAssignmentResource) Hi() ResourceFunc {
28 rf := r.base.f("Hello world")
29 rf.base = r.base
30 return rf
31 }
32
33 func main() {
34 var r SubscriptionAssignmentResource
35 r.Hi()
36 }
37
View as plain text