Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Swift
/
Structures and classes
What does let session = Session() guarantee when Session is a class with mutable properti…
from Structures and classes
Swift 6.3.3
beginner
1 min
What does let session = Session() guarantee when Session is a class with mutable properties?
session cannot be rebound to another instance, but the referenced instance can still mutate through its var properties.
Every property reachable from session becomes deeply immutable.
The instance is copied before every mutating method call.
Check
Ask AI about this kata
Report an error
next kata
How should a public library treat a structure’s synthesized memberwise initializer?
Quiz
A new version is available
Reload