From cd91e1529ebec3e0a1cabd8bb0daf8cf0d2d21e6 Mon Sep 17 00:00:00 2001 From: Ana Buigues Date: Sat, 7 Jan 2017 14:10:33 +0100 Subject: [PATCH] Update main.go Additional example to clarify the property overriding --- 20_struct/05_promotion/01_overriding-fields/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/20_struct/05_promotion/01_overriding-fields/main.go b/20_struct/05_promotion/01_overriding-fields/main.go index 4c5ca3c0..6b8b5b5a 100644 --- a/20_struct/05_promotion/01_overriding-fields/main.go +++ b/20_struct/05_promotion/01_overriding-fields/main.go @@ -40,4 +40,5 @@ func main() { // fields and methods of the inner-type are promoted to the outer-type fmt.Println(p1.First, p1.person.First) fmt.Println(p2.First, p2.person.First) + fmt.Println(p1.Last, p1.person.Last) }