Files
swift-mirror/test/Constraints/add_with_nil.swift
2019-10-29 10:33:16 -07:00

7 lines
299 B
Swift

// RUN: %target-typecheck-verify-swift -swift-version 5 -solver-enable-operator-designated-types -solver-disable-shrink -disable-constraint-solver-performance-hacks
func test(_ x: Int) -> Int {
return x + nil
// expected-error@-1 {{'nil' is not compatible with expected argument type 'Int'}}
}