Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,9 @@ public struct MySwiftStruct {
get { return subscriptArray[index] }
set { subscriptArray[index] = newValue }
}

// operator functions are ignored.
public static func ==(lhs: MySwiftStruct, rhs: MySwiftStruct) -> Bool {
return false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@ public struct MySwiftStruct {
get { return subscriptArray[Int(index)] }
set { subscriptArray[Int(index)] = newValue }
}

// operator functions are ignored.
public static func ==(lhs: MySwiftStruct, rhs: MySwiftStruct) -> Bool {
return false
}
}
8 changes: 8 additions & 0 deletions Sources/JExtractSwiftLib/Swift2JavaVisitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ final class Swift2JavaVisitor {
return
}

switch node.name.tokenKind {
case .binaryOperator, .prefixOperator, .postfixOperator:
self.log.debug("Skip importing: '\(node.qualifiedNameForDebug)'; Operators are not supported.")
return
default:
break
}

self.log.debug("Import function: '\(node.qualifiedNameForDebug)'")

let signature: SwiftFunctionSignature
Expand Down
Loading