alexandre mommers
08/01/2023, 2:16 PMclass TypeRef
...
fun DeclarationRepository.resolve(): TypeRef = findDeclarationByName<NameableDeclaration>(typeName)
?.let { ResolvedTypeRef(typeName, it) }
?: (UnresolvedTypeRef(typeName)
.also { logger.warn { "fail to resolve type : $it" } })
Instead of logging what wrong, i want to return UnresolvedTypeRef with a TypeNotResolve as error to process it on higher layer of code.
Ior seem like what i need https://arrow-kt.io/learn/typed-errors/either-and-ior/ but from the documentation, I dont get how to use the DSL.
Anybody could help ?