Kolos65 / Mockable

A Swift macro driven auto-mocking library.
MIT License
222 stars 15 forks source link

BAD_ACCESS on some types #65

Open CedricGatay opened 1 month ago

CedricGatay commented 1 month ago

When mocking a protocol with some types like the following:

func get<T: Decodable, U: Encodable>(url: URLConvertible, body: U?, displayLoader: Bool, useDefaultErrorHandler: Bool) async
        -> Result<T, Error>

The mock generation works fine, but it crashes on test execution with BAD_ACCESS, it looks like it is related to https://github.com/swiftlang/swift/issues/61357, do you have any idea on fixing this @Kolos65 ?

Kolos65 commented 3 weeks ago

@CedricGatay I could not repro this, can you elaborate on this issue with some isolated example protocols and tests?