mockingbird
mockingbird copied to clipboard
Crash in generator with protocol with subtract operator.
New Issue Checklist
- [x] I updated my Mockingbird framework and CLI to the latest version
- [x] I searched for existing GitHub issues
Description
Running Mockingbird on an app target with the following protocol anywhere in the app target (not test target) is causing exceptions to be thrown by the generator. I have replicated this in an empty brand new project. This protocol is not used in the tests, just included in the app target.
protocol FailingProtocol {
static func -(lhs: Self, rhs: Self) -> Self
}
Output from generator:
Pods/MockingbirdFramework/mockingbird: line 27: 20483 Illegal instruction: 4 MKB_LAUNCHER="$0" "${binaryPath}" "$@"
Note that the following protocol with an addition rather than subtraction operator does not cause any issues and the tests execute as expected.
protocol FailingProtocol {
static func +(lhs: Self, rhs: Self) -> Self
}
Crash report from Console: mockingbird_crash.txt
Environment
- Mockingbird CLI version: 0.18.1
- Xcode and macOS version. Xcode: 12.5 (12E262). macOS: 11.5.1
- Swift version: 5.4
- Installation method: Cocoapods
- Unit testing framework: XCTest
- Does your project use
.mockingbird-ignore? No. - Are you using supporting source files? Yes