Ban __conversion functions.

Swift SVN r21015
This commit is contained in:
Doug Gregor
2014-08-04 15:54:15 +00:00
parent a75c7a427a
commit 9d5ba31daa
3 changed files with 12 additions and 0 deletions

View File

@@ -128,3 +128,8 @@ func !!!<T>(lhs: UnsafePointer<T>, rhs: UnsafePointer<T>) -> Bool { return false
func var_inout_error(inout var x : Int) {} // expected-error {{parameter may not have multiple 'inout', 'var', or 'let' specifiers}}
func var_inout_error(var inout x : Int) {} // expected-error {{parameter may not have multiple 'inout', 'var', or 'let' specifiers}}
// Ban __conversion
struct Conversion {
func __conversion() -> Int { return 0 } // expected-error{{'__conversion' functions are no longer allowed}}
}