Skip to content

Commit 649140b

Browse files
authored
Merge pull request #280 from rintaro/jextract-ffm-noeffect
[JExtract] Prohibit 'throws' in FFM generator
2 parents 5c69766 + d78fee1 commit 649140b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/JExtractSwiftLib/FFM/CDeclLowering/FFMSwift2JavaGenerator+FunctionLowering.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ struct CdeclLowering {
109109
)
110110
}
111111

112+
for effect in signature.effectSpecifiers {
113+
// Prohibit any effects for now.
114+
throw LoweringError.effectNotSupported(effect)
115+
}
116+
112117
// Lower the result.
113118
let loweredResult = try lowerResult(signature.result.type)
114119

@@ -642,4 +647,5 @@ extension LoweredFunctionSignature {
642647
enum LoweringError: Error {
643648
case inoutNotSupported(SwiftType)
644649
case unhandledType(SwiftType)
650+
case effectNotSupported(SwiftEffectSpecifier)
645651
}

0 commit comments

Comments
 (0)