Skip to content

Error in example app #2

@mvantuch

Description

@mvantuch

In Boa/Modules/WeatherDetail/WeatherPageViewController.swift,
there's an error in the code snippet on line number 109:

extension WeatherPageViewController {
    fileprivate func initViewControllers() {
        let weatherDetailStoryboard = UIStoryboard(name: "WeatherDetail", bundle: nil)
        
        orderedWeatherDetailViewControllers = weatherReports.map {
            let weatherDetailVC = weatherDetailStoryboard.instantiateViewController(withIdentifier: "WeatherDetail") as! WeatherDetailViewController
            weatherDetailVC.weatherReport = $0
            weatherDetailVC.styler = styler
            return weatherDetailVC
        }
    }
}

There should be used ? or ! in order to apply correct method, which returns [T] instead of just returning optional type U? for example. I think it is a result of compiler changes explained here:
https://swift.org/blog/iuo/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions