Skip to content

Commit e2cfe98

Browse files
committed
Seems we never formally made @unsigned apply to methods, even tho
generating code which assumed this was correct huh
1 parent 36d24fa commit e2cfe98

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Sources/JExtractSwiftLib/JNI/JNISwift2JavaGenerator+JavaTranslation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ extension JNISwift2JavaGenerator {
21412141
_fileID: String = #fileID,
21422142
_line: Int = #line,
21432143
) -> JavaTranslationError {
2144-
.unsupportedSwiftType(knowvan: type, fileID: _fileID, line: _line)
2144+
.unsupportedSwiftType(known: type, fileID: _fileID, line: _line)
21452145
}
21462146

21472147
/// The user has not supplied a mapping from `SwiftType` to

SwiftKitCore/src/main/java/org/swift/swiftkit/core/annotations/Unsigned.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
* in a method signature corresponds to a Swift {@code UInt64} type, and therefore
3333
* negative values reported by the signed {@code long} should instead be interpreted positive values,
3434
* larger than {@code Long.MAX_VALUE} that are just not representable using a signed {@code long}.
35+
* <p/>
36+
* If this annotation is used on a method, it refers to the return type using an unsigned integer.
3537
*/
3638
@Documented
3739
@Label("Unsigned integer type")
3840
@Description("Value should be interpreted as unsigned data type")
39-
@Target({TYPE_USE, PARAMETER, FIELD})
41+
@Target({TYPE_USE, PARAMETER, FIELD, METHOD})
4042
@Retention(RetentionPolicy.RUNTIME)
4143
public @interface Unsigned {
4244
}

0 commit comments

Comments
 (0)