Skip to content

Commit d96970d

Browse files
committed
[Import as member] forbid swift_name on non-prototyped declarations
1 parent 0fc2cd4 commit d96970d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

proposals/0044-import-as-member.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ extern struct Point3D identityPoint
182182
__attribute__((swift_name("Point3D.identity")));
183183

184184
// Import as static computed property
185-
Point3D getZeroPoint()
185+
Point3D getZeroPoint(void)
186186
__attribute__((swift_name("getter:Point3D.zero()")));
187187
void setZeroPoint(Point3D point)
188188
__attribute__((swift_name("setter:Point3D.zero(_:)")));
@@ -195,6 +195,8 @@ The string present in swift_name will additionally support the following:
195195
method/property, otherwise this will be a static method/property
196196
* ``getter:`` and ``setter:`` to denote the function as a property getter/setter
197197
198+
*Amendment:* swift_name is not valid on non-prototyped function declarations.
199+
198200
### Automatic inference heuristics
199201
200202
The following are some techniques and heuristics that can be useful for

0 commit comments

Comments
 (0)