Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

[SoM] Unable to find swiftmodule file for OtherUnit #118

Open
chamons opened this issue Aug 10, 2018 · 3 comments
Open

[SoM] Unable to find swiftmodule file for OtherUnit #118

chamons opened this issue Aug 10, 2018 · 3 comments
Milestone

Comments

@chamons
Copy link
Contributor

chamons commented Aug 10, 2018

public protocol TimeUnit {
    
    static var toTimeIntervalRatio: Double { get }
    
}

public struct Interval<Unit : TimeUnit> {
    
    public init(_ value: Double) {
    }
    
    public var timeInterval: Foundation.TimeInterval {
        return 0
    }
    
    public init(timeInterval: Foundation.TimeInterval) {
        let value = timeInterval / Unit.toTimeIntervalRatio
        self.init(value)
    }
    
}

public extension Interval {
    
    func converted<OtherUnit : TimeUnit>(to otherTimeUnit: OtherUnit.Type = OtherUnit.self) -> Interval<OtherUnit> {
        return Interval<OtherUnit>(0)
    }
}
Error (Fatal): Unable to find swiftmodule file for OtherUnit for target x86_64-apple-macosx10.12. (CompilerException)
@chamons
Copy link
Contributor Author

chamons commented Aug 10, 2018

From Time.framework

@chamons
Copy link
Contributor Author

chamons commented Aug 10, 2018

I am very uncertain if this is a "real" issue, as I don't understand what's going on, but it is preventing the library from wrapping.

@stephen-hawley
Copy link
Contributor

Note to future Steve: Associated type - note fully sure what they're trying to express.

@stephen-hawley stephen-hawley transferred this issue from another repository Oct 29, 2019
@chamons chamons added this to the Future milestone Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants