mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Inherit complete object initializers when a class supports it.
Teach name lookup to find complete object initializers in its superclass when the current class overrides all of the subobject initializers of its direct superclass. Clean up the implicit declaration of constructors, so we don't rely on callers in the type checker doing the right thing. When we refer to a constructor within the type checker, always use the type through which the constructor was found as the result of construction, so that we can type-check uses of inherited complete object initializers. Fixed a problem with the creation of OpenExistentialExprs when the base object is a metatype. The changes to the code completion tests are an improvement: we're generating ExprSpecific completion results when referring to the superclass initializer with the same signature as the initializer we're in after "super.". Swift SVN r14551
This commit is contained in:
@@ -100,7 +100,7 @@ enum NameLookupOptions {
|
||||
NL_RemoveNonVisible | NL_RemoveOverridden,
|
||||
|
||||
/// The default set of options used for constructor lookup.
|
||||
NL_Constructor = NL_RemoveNonVisible
|
||||
NL_Constructor = NL_QualifiedDefault
|
||||
};
|
||||
|
||||
/// Describes the result of looking for the conformance of a given type
|
||||
|
||||
Reference in New Issue
Block a user