Commits

John McCall committed a1c16935293
Change the names of the object-literal initializers to be semantically unambiguous. We didn't actually intend to change how programmers normally constructed these types, but the change to the object literal syntax accidentally caused these initializers to have very natural-seeming signatures. These initializers also created possible ambiguities with the actual initializers. Renaming them to refer to their function as literal initializers is the right thing to do. Unfortunately, this provided to be somewhat annoying, as the code was written to assume that the argument tuple following e.g. #colorLiteral could be directly passed to the initializer. We solve this by hacking on both ends of the constraint system: during generation we form a conversion constraint to the original, idealized parameter type, and during application we rewrite the argument tuple type to use the actual labels. This nicely limits the additional complexity to just the parts dealing with object literals. Note that we can't just implicitly rewrite the tuple expression because that would break invariants tying the labels to physical source ranges. We also don't want to just change the literal syntax again and break compatibility with existing uses. rdar://26148507