Update docs.md

pull/13560/head
gcxfd 2022-02-22 21:36:00 +08:00 committed by GitHub
parent fca271489e
commit 034e33046f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -2149,6 +2149,8 @@ Button{
}
```
Similar to inheritance, structs will automatically have the fields and methods from embedded structs.
Unlike inheritance in OOP, you cannot type cast between structs and embedded structs.
If you need to access embedded structs directly, use an explicit reference like `button.Size`.