[Sema] Fix SR-590 Passing two parameters to a function that takes one argument of type Any crashes the compiler

This commit is contained in:
Alex Hoppen
2016-01-26 22:47:14 +01:00
parent d2cccdeac0
commit b54976baba
2 changed files with 13 additions and 0 deletions

View File

@@ -75,3 +75,8 @@ A().a(text:"sometext") // expected-error {{argument labels '(text:)' do not matc
func r22451001() -> AnyObject {}
print(r22451001(5)) // expected-error {{argument passed to call that takes no arguments}}
// SR-590 Passing two parameters to a function that takes one argument of type Any crashes the compiler
func sr590(x: Any) {}
sr590(3,4) // expected-error {{extra argument in call}}