Re: [swift-users] Type of expression is ambiguous for static tuples

2017-09-01 Thread Slava Pestov via swift-users
Yeah, my understanding is that .foo syntax only works if ‘foo’ is an immediate static member of the contextual type where the expression appears. So nested member access like .foo.b ar does not make sense. Slava > On Sep 1, 2017, at 6:04 AM, Adrian Zubarev via swift-users >

[swift-users] Writing a pod catcher for iOS

2017-09-01 Thread Nicholas Acosta via swift-users
Good afternoon, I was wondering if anyone can help me with creating a podcast/RSS reader in swift. I have been taking basic iOS courses and learning how to use Xcode. I am fully comfortable with using Xcode and the templates that are available in iOS. I am also familiar with the frameworks for

Re: [swift-users] Type of expression is ambiguous for static tuples

2017-09-01 Thread Adrian Zubarev via swift-users
Yet this is correct behavior because the compiler cannot traverse the expression tree without knowing the root type of that expression tree. The type information flow in such case should be from root to the leaves where the root is NOT the root of the expression, but the type from the function

Re: [swift-users] Type of expression is ambiguous for static tuples

2017-09-01 Thread David Hart via swift-users
Its slightly different though. In the case of: let cgColor: CGColor = .clear.cgColor clear is a static property on UIColor, not CGColor. In his example, pythagoreanTriple is a property on Double so it does feel like a bug. > On 1 Sep 2017, at 13:31, Adrian Zubarev via swift-users >

Re: [swift-users] Type of expression is ambiguous for static tuples

2017-09-01 Thread Adrian Zubarev via swift-users
It’s because the compiler does not support this yet. It’s the same with `let cgColor: CGColor = .clear.cgColor // will not work`. Instead you need to write `UIColor.clear.cgColor` or in your case `Double.phythagoreanTruple.0` Am 1. September 2017 um 12:17:57, Rudolf Adamkovič via swift-users

[swift-users] Type of expression is ambiguous for static tuples

2017-09-01 Thread Rudolf Adamkovič via swift-users
Given the following extension ... extension Double { typealias Triple = (Double, Double, Double) static let pythagoreanTriple: Triple = (3, 4, 5) } ... why does Swift compiler emits the following errors? // Type of expression is ambiguous without more context let a: Double =

Re: [swift-users] Still can't derive from a generic class

2017-09-01 Thread Joanna Carter via swift-users
Hi Joe Thanks for your input on this. > This is likely due to the runtime not handling cycles properly in type > metadata initialization—a subclass T needs its base class metadata for > BaseObject, which in turn needs the metadata for T to instantiate the > generic type. This is something we