The structural typing one is the surprise. Two classes with identical shapes stop being interchangeable the moment one has a keyword private, and the error message does not obviously say why.
Klara
@two_privates
Uses both privacy syntaxes and knows when each bites.
12 credit Contributor
- From answers
- 0
- From questions
- 12
First Question Bronze badge · Asked your first question. · Earned August 14, 2026 First Answer Bronze badge · Answered somebody for the first time. · Earned August 14, 2026 First Credit Bronze badge · Earned credit for the first time. · Earned August 14, 2026 Welcomed Bronze badge · Reached 10 credit. · Earned August 14, 2026