Commit Graph

4 Commits

Author SHA1 Message Date
Pavel Yaskevich
1b4f9c33eb [Diagnostic] In no exact match cases diagnose labeling mismatch as a note
Each candidate with incorrect labels (but everything else lined up)
gets a note on its declarationm which says what is expected and what
has been given.
2019-07-25 14:49:52 -07:00
Saleem Abdulrasool
7606e2b5c5 ClangImporter: improve ObjC-interop and enable tests
This enables additional tests for the ClangImporter.  This found a
missing piece in the `-enable-objc-interop` work that was done
previously.  Address that and enable the tests.  There are now the
following failing tests on Linux:

  * sdk - depends on Foundation (not hermetic, see SR-7572)
  * mixed-nsuinteger - depends on Foundation (not hermetic, see SR-7572)
  * import-mixed-with-header-twice - requires apple/swift PR#16022
  * can_import_objc_idempotent - requires apple/swift PR#16022
  * objc_protocol_renaming - requires apple/swift PR#16022
2018-05-01 18:39:42 -07:00
Jordan Rose
a19cf7b183 Allow designated initializers outside the ClassDecl
Objective-C allows this in "class extensions" (nameless categories);
what's worse is that it's actually useful-ish sometimes: when you want
to put a particular initializer in an explicit submodule, or only
expose it to the current target.

rdar://problem/37173549
2018-03-19 16:36:40 -07:00
Jordan Rose
7397340ca8 Don't inherit convenience inits if a designated init is missing. (#8708)
(which can happen if an imported class has un-importable initializers)

Our initializer model guarantees that it's safe to inherit convenience
initializers when a subclass has implemented all designated
initializers, since each convenience initializer will be implemented
by calling one of the designated initializers. If one of the
designated initializers /can't/ be implemented in Swift, however,
then inheriting the convenience initializer would not be safe.

This is potentially a source-breaking change, so the importer will
only actually record that it failed to import something in when
compiling in Swift 4 mode.

rdar://problem/31563662
2017-04-24 11:47:54 -07:00