mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This folds member access on types to a TypeExpr if the member resolves to a nested type. This allows [Foo.Bar]() to become an ApplyExpr of a TypeExpr, rather than an ApplyExpr of an array literal; previously, only [Foo]() worked. Two cases that are still unsupported: 1) If G is a generic type and T is a generic typealias, then G.T<X> cannot be folded to a TypeExpr, because we cannot represent a generic typealias with an unbound generic parent type. Such lookups remain member lookups, where Sema first opens the base type to produce a bound generic type G<$T0>, and then resolves the generic typealias member on that. 2) If T is a generic parameter and X is an associated type, T.X is not folded down to a TypeExpr either. Fixes <rdar://problem/16849958>.
279 B
279 B