Commit Graph

3 Commits

Author SHA1 Message Date
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
724e2efa02 [gardening] Remove "REQUIRES: asserts" from fixed crashers 2017-01-06 16:38:25 +01:00
Slava Pestov
9f30532641 Sema: Fix closeExistential() in CSApply with invalid direct call of metatype
When we have a value 'p' of type 'P.Type' for some protocol 'P',
we require the user to write 'p.init()' rather than 'p()' to
construct an instance of a concrete type conforming to 'P'.

If they write 'p()', we suggest a fixit to insert '.init',
however if there is also a subsequent member access on the
result, for example 'p().foo', we would crash.

Another invalid case that used to crash is when you construct
a protocol metatype directly and then access a member of it,
eg. 'P().foo'.
2017-01-03 21:28:11 -08:00