     // expected-note@+1 *{{'f(aa:_:_:)' declared here}}
     func f(aa: Int, _ bb: Int, _ cc: Int) {}
 
+    f(1)
+    // expected-error@-1:7 {{missing arguments for parameters 'aa', #3 in call}}
+
     f(0, 1)
     // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+
+    f(1, 2, 3)
+    // expected-error@-1:6 {{missing argument label 'aa:' in call}}
+
+    f(1, aa: 2, 3)
+    // expected-error@-1:10 {{argument 'aa' must precede unnamed argument #1}}
+
+    f(1, xx: 2, 3)
+    // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+    // expected-error@-2:17 {{extra argument in call}}
+
+    f(aa: 1, 2, 3) // ok
+
+    f(xx: 1, 2, 3)
+    // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+    // expected-error@-2:17 {{extra argument in call}}
+
+    f(xx: 1, 2, yy: 3)
+    // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+    // expected-error@-2:21 {{extra argument 'yy' in call}}
+
+    f(xx: 1, yy: 2, 3)
+    // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+    // expected-error@-2:21 {{extra argument in call}}
+
+    f(1, xx: 2, yy: 3)
+    // expected-error@-1:7 {{missing argument for parameter 'aa' in call}}
+    // expected-error@-2:21 {{extra argument 'yy' in call}}
+
+    f(1, 2, 3, 4)
+    // expected-error@-1:16 {{extra argument in call}}
+
+    f(1, aa: 2, 3, 4)
+    // expected-error@-1:20 {{extra argument in call}}
+
+    f(1, aa: 2, 3, xx: 4)
+    // expected-error@-1:24 {{extra argument 'xx' in call}}
+
+    f(1, aa: 2, xx: 3, 4)
+    // expected-error@-1:24 {{extra argument in call}}
   }
 
   do {


    f(0, bb: 1, 2)
    // expected-error@-1:6 {{missing argument label 'aa:' in call}}
  }

  do {

  do {
    func f(_ aa: Int) {}

    f(1) // ok

    f(xx: 1)
    // expected-error@-1 {{extraneous argument label 'xx:' in call}}

    f(0, 1)
    // expected-error@-1:10 {{extra argument in call}}

    f(xx: 1, 2)
    // expected-error@-1:14 {{extra argument in call}}

    f(1, xx: 2)
    // expected-error@-1:14 {{extra argument 'xx' in call}}

    f(xx: 1, yy: 2)
    // expected-error@-1:18 {{extra argument 'yy' in call}}
  }

  do {
    func f(aa: Int) { }

    f(1)
    // expected-error@-1:7 {{missing argument label 'aa:' in call}}

    f(aa: 1) // ok

    f(xx: 1)
    // expected-error@-1 {{incorrect argument label in call (have 'xx:', expected 'aa:')}}
  }

  do {
    func f(_ aa: Int, _ bb: Int) { }
    // expected-note@-1 3 {{'f' declared here}}

    f(1)
    // expected-error@-1:8 {{missing argument for parameter #2 in call}}

    f(xx: 1)
    // expected-error@-1 {{extraneous argument label 'xx:' in call}}
    // expected-error@-2:12 {{missing argument for parameter #2 in call}}

    f(1, 2) // ok

    f(1, xx: 2)
    // expected-error@-1 {{extraneous argument label 'xx:' in call}}

    f(xx: 1, 2)
    // expected-error@-1 {{extraneous argument label 'xx:' in call}}

    f(xx: 1, yy: 2)
    // expected-error@-1 {{extraneous argument labels 'xx:yy:' in call}}

    f(xx: 1, 2, 3)
    // expected-error@-1:17 {{extra argument in call}}

    f(1, xx: 2, 3)
    // expected-error@-1:17 {{extra argument in call}}

    f(1, 2, xx: 3)
    // expected-error@-1:17 {{extra argument 'xx' in call}}

    f(xx: 1, yy: 2, 3)
    // expected-error@-1:21 {{extra argument in call}}

    f(xx: 1, yy: 2, 3, 4)
    // expected-error@-1:6 {{extra arguments at positions #3, #4 in call}}
  }

  do {
    func f(_ aa: Int = 0, _ bb: Int) { }
    // expected-note@-1 {{'f' declared here}}

    f(1)
    // expected-error@-1:8 {{missing argument for parameter #2 in call}}

    f(1, 2) // ok
  }

  do {
    func f(_ aa: Int, bb: Int) { }
    // expected-note@-1 3 {{'f(_:bb:)' declared here}}

    f(1)
    // expected-error@-1:8 {{missing argument for parameter 'bb' in call}}

    f(1, 2)
    // expected-error@-1 {{missing argument label 'bb:' in call}}

    f(1, bb: 2) // ok

    f(xx: 1, 2)
    // expected-error@-1 {{incorrect argument labels in call (have 'xx:_:', expected '_:bb:')}}

    f(xx: 1, bb: 2)
    // expected-error@-1 {{extraneous argument label 'xx:' in call}}

    f(bb: 1, 2, 3)
    // expected-error@-1:17 {{extra argument in call}}

    f(1, bb: 2, 3)
    // expected-error@-1:17 {{extra argument in call}}

    f(1, 2, bb: 3)
    // expected-error@-1:10 {{extra argument in call}}

    f(xx: 1, 2, 3)
    // expected-error@-1:17 {{extra argument in call}}

    f(1, xx: 2, 3)
    // expected-error@-1:6 {{extra arguments at positions #2, #3 in call}}
    // expected-error@-2:8 {{missing argument for parameter 'bb' in call}}

    f(1, 2, xx: 3)
    // expected-error@-1:17 {{extra argument 'xx' in call}}
  }

  do {
