Files
swift-mirror/validation-test/compiler_crashers/24245-swift-constraints-constraintsystem-solve.swift
2016-03-14 20:53:03 +01:00

13 lines
276 B
Swift

// RUN: not --crash %target-swift-frontend %s -parse
// REQUIRES: asserts
// Issue found by https://github.com/robrix (Rob Rix)
// http://www.openradar.me/19924870
func unit<T>(x: T) -> T? {
return x
}
func f() -> Int? {
return unit(1) ?? unit(2).map { 1 } ?? nil
}