From b96380d735cdbc4d0658b7345b414ba85c1436e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Zu=CC=81n=CC=83iga=20Lagunas?= Date: Tue, 30 Apr 2024 11:42:57 -0600 Subject: [PATCH] fix for the case when the text some exists in the returning type --- Sources/MockoloFramework/Utils/TypeParser.swift | 2 +- .../TestOpaqueTypeFuncs/FixtureOpaqueTypeFunc.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/MockoloFramework/Utils/TypeParser.swift b/Sources/MockoloFramework/Utils/TypeParser.swift index cbfd9ca4..4b89b3d1 100644 --- a/Sources/MockoloFramework/Utils/TypeParser.swift +++ b/Sources/MockoloFramework/Utils/TypeParser.swift @@ -601,7 +601,7 @@ public final class `Type` { if let closureRng = closureRng { let left = ret[ret.startIndex.. (some Error)) + func register(router: @autoclosure @escaping () -> (some MyAwesomeType)) } """ @@ -106,8 +106,8 @@ class ProtocolReturningOpaqueTypeInClosureProtocolMock: ProtocolReturningOpaqueT private(set) var registerCallCount = 0 - var registerHandler: ((@autoclosure @escaping () -> (any Error)) -> ())? - func register(router: @autoclosure @escaping () -> (some Error)) { + var registerHandler: ((@autoclosure @escaping () -> (any MyAwesomeType)) -> ())? + func register(router: @autoclosure @escaping () -> (some MyAwesomeType)) { registerCallCount += 1 if let registerHandler = registerHandler { registerHandler(router())