> UIBezierPath is shared for all instances of the enum case. So stored
> properties are stored per case, not per instance (you have associated
> values for per instance values).
> 
>> that isn't really what this syntax suggests is happening
> 
> Please explain what makes you think that way.

Because you wrote `let bezierPath = UIBezierPath()` in the middle of a type 
definition, and in all other types, you would get a new bezier path for each 
instance.

        struct Struct {
                let bezierPath = UIBezierPath()         // per instance
        }
        class Class {
                let bezierPath = UIBezierPath()         // per instance
        }
        func function() {
                let bezierPath = UIBezierPath()         // per call
        }
        enum Enum {
                case aCase {
                        let bezierPath = UIBezierPath() // shared?!?!
                }
        }

-- 
Brent Royal-Gordon
Architechies

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to