Commit Graph

4 Commits

Author SHA1 Message Date
Jordan Rose
6e1bf0d10d Rename @exported to @_exported for now.
At some point I want to propose a revised model for exports, but for now
just mark that support for '@exported' is still experimental and subject
to change. (Thanks, Max.)
2015-11-05 11:59:00 -08:00
Jordan Rose
4fda02e846 [ClangImporter] Follow swift_name more closely when error params are involved.
+ (Foo *)foo:(id)obj error:(NSError **)error NS_SWIFT_NAME(init(object:));
  + (Foo *)foo:(id)obj error:(NSError **)error NS_SWIFT_NAME(init(object:error:));

These are now mapped, respectively, to

  init(object: AnyObject) throws
  init(object: AnyObject, error: ()) throws

rather than both mapping to the first one and having no way to specify the second.

Swift side of rdar://problem/21091469. Requires Clang commits.

Swift SVN r29534
2015-06-20 18:55:10 +00:00
Greg Parker
a8e54c13b2 [test] Disable an ObjC test on non-ObjC platforms.
Swift SVN r29029
2015-05-26 08:58:07 +00:00
Jordan Rose
cb2ca7d997 [ClangImporter] Remap factory methods according to the swift_name attr.
On a factory method, swift_name can have two effects:

- If the custom name has a base name of "init", import the method as an
  initializer, even if it doesn't follow the usual naming conventions.
- Otherwise, import the method as a method, even if it /would have/ been
  imported as an initializer.

There's a bit of trickiness around NSError**: currently you have to specify
the name of the error parameter on the Clang side even if it's going to be
deleted on the Swift side. We may want to change this later.

The test cases here exposed the issues in the previous two commits,
so this effectively depends on those for passing tests.

More of rdar://problem/19240897.

Swift SVN r28979
2015-05-24 01:48:24 +00:00