ardanlabs / gotraining

Go Training Class Material :
http://www.ArdanLabs.com
Other
11.82k stars 2.17k forks source link

Inner type promotion #368

Closed myers-dev closed 2 years ago

myers-dev commented 2 years ago

Inner type promotion from the lecture 4.3 - Embedding , example https://go.dev/play/p/mbuA2SDiHKV?v=goprev is not working as intended

./prog.go:43:4: ad.notify undefined (type admin has no field or method notify)

Go build failed.

ardan-bkennedy commented 2 years ago

Your playground example will not work since you are not embedding. The code examples in the training do appear to be correct. I just want to double check your version is not possibility a typo?

https://github.com/ardanlabs/gotraining/tree/master/topics/go/language/embedding