Revision a87ef76f85c8c42fa15329ea53adda4793bf9686 authored by Mishal Shah on 27 August 2019, 23:26:43 UTC, committed by GitHub on 27 August 2019, 23:26:43 UTC
bump compiler version to 5.0.3
materializable_restrictions.swift
// RUN: %target-typecheck-verify-swift
func test15921520() {
var x: Int = 0
func f<T>(_ x: T) {} // expected-note{{in call to function 'f'}}
f(&x) // expected-error{{generic parameter 'T' could not be inferred}}
}
func test20807269() {
var x: Int = 0
func f<T>(_ x: T) {}
f(1, &x) // expected-error{{extra argument in call}}
}
func test15921530() {
struct X {}
func makef<T>() -> (T) -> () { // expected-note {{in call to function 'makef()'}}
return {
x in ()
}
}
var _: (inout X) -> () = makef() // expected-error{{generic parameter 'T' could not be inferred}}
}
Computing file changes ...