// RUN: %swift %s -parse -verify // Test case submitted to project by https://github.com/tmu (Teemu Kurppa) // rdar://18175202 func some == S.Generator.Element>(xs : S) -> T? { for (mx : T?) in xs { // // expected-error {{type of expression is ambiguous without more context}} if let x = mx { return x } } return nil } let xs : [Int?] = [nil, 4, nil] println(some(xs))