@BlockPointer public SomeBlock = (Int) -> (String); // E5 Attributes are not allowed here
// vs. // E477 Declaration expected
@FunctionPointer public SomeFunc = (Int) -> (String);
Which, based on the errors should be:
@FunctionPointer public typealias SomeFunction = (String) -> Int
// vs.
@BlockPointer public typealias SomeBlock = (String) -> Int
However, as Oxygene uses native type modifiers method and block to distinguish these cases, and the Aspects are not possible to specify inline, Elements should use Swift’s native way to distinguish these cases.
I believe you do support them, but the docs do not mention them, while they do mention the Oxygene versions, and in fact what is shown in the Swift docs tab does not even compile as-is.
Yeah, that one just looks to be a docs issue/typo; both Xcode and our compiler do require the “typealias” keyword. Fixed.
Not as far as I can tell:
@convention(c) public typealias SomeBlock3 = (String) -> (Int); // E28 Unknown type "convention"
@convention(block) public typealias SomeBlock4 = (String) -> (Int); // E28 Unknown type "convention"
bugs://83065 should take care of that when done, in the mean time using @BlockPointer or @FunctionPointer is the best workaround (and those will keep working, as they are language-independent).