Function returning (Double, Double) not a candidate for (CGFloat, CGFloat)?

var p: CGPoint
func f() -> (Double, Double) { (1, 1) }
(p.x, p.y) = f()

No 'evaluateVector' candidates produce the expected contextual result type '(CGFloat, CGFloat)'

Is this a bug or expected behavior?

Easy enough to handle with some boilerplate, just curious why the SE-307 automatic conversion isn't occurring.

1 Like
Terms of Service

Privacy Policy

Cookie Policy