Files
swift-mirror/test/expr/postfix/call/default_args.swift
Doug Gregor b2cc34c241 Remove '#' for making parameter names into argument labels.
If you want to make the parameter and argument label the same in
places where you don't get the argument label for free (i.e., the
first parameter of a function or a parameter of a subscript),
double-up the identifier:

  func translate(dx dx: Int, dy: Int) { }

Make this a warning with Fix-Its to ease migration. Part of
rdar://problem/17218256.

Swift SVN r27715
2015-04-24 23:58:57 +00:00

10 lines
242 B
Swift

// RUN: %target-parse-verify-swift
func foo(x x: Int = 0) {}
let bar = foo
bar() // expected-error {{missing argument for parameter 'x'}}
func foo2(x: Int = 0) {}
let baz = foo2
baz() // expected-error {{missing argument for parameter #1}}