Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type of expression is ambiguous without more context #19

Closed
VivienGiraud opened this issue Sep 27, 2016 · 2 comments
Closed

Type of expression is ambiguous without more context #19

VivienGiraud opened this issue Sep 27, 2016 · 2 comments

Comments

@VivienGiraud
Copy link

Hi,

Since Swift3 update I have this strange behaviour Type of expression is ambiguous without more context with that simple code:

import Log

let Log = Logger(formatter: .Detailed,
                 theme: .TomorrowNight,
                 minLevel: .Trace)

extension Formatters {
    static let Detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ //Error is just here
        .Date("yyyy-MM-dd HH:mm:ss.SSS"),
        .File(fullPath: false, fileExtension: false),
        .Function,
        .Line,
        .Level,
        .Message
        ])
}

extension Themes {
    static let TomorrowNight = Theme(
        trace:   "#C5C8C6",
        debug:   "#81A2BE",
        info:    "#B5BD68",
        warning: "#F0C674",
        error:   "#CC6666"
    )
}

Any help would be appreciated.
Vivien

@VivienGiraud
Copy link
Author

Any idea?
I'm running out of idea :/

@VivienGiraud
Copy link
Author

It seams that changing from UpperCamelCase to lowerCamelCase for:
extension Formatters { static let Detailed = Formatter("[%@] %@.%@:%@ %@: %@", [ //Error is just here .Date("yyyy-MM-dd HH:mm:ss.SSS"), .File(fullPath: false, fileExtension: false), .Function, .Line, .Level, .Message ]) }
Did the trick.
Anyway, no syntax colour with Xcode 8 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant