Commit Graph

5 Commits

Author SHA1 Message Date
fummicc1
4dda7efc0f [AST] Improve diagnostics message for swift users.
Use `initializer` instead of `constructor` because it is more official word to express its meaning.
2024-03-27 12:32:25 +09:00
fwcd
9f21b4a2f6 Fix remaining SourceKit tests 2021-05-08 00:40:53 +02:00
Slava Pestov
cde493de0d Sema: Support member types in preCheckExpression()
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>.
2017-05-21 18:12:12 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Argyrios Kyrtzidis
8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00