Files
swift-mirror/test/Parse/function_call.swift
Alex Hoppen 695e69e09e [CodeComplete] Suggest single argument labels if code completion is invoked at start of function call with exiting parameters
This removes the distinction between argument completions and postfix expr paren completions, which was meaningless since solver-based completion.

It then determines whether to suggest the entire function call pattern (with all argument labels) or only a single argument based on whether there are any existing arguments in the call.

For this to work properly, we need to improve parser recovery a little bit so that it parsers arguments after the code completion token properly.

This should make call pattern heuristics obsolete.

rdar://84809503
2024-01-22 12:21:04 -08:00

5 lines
181 B
Swift

// RUN: %target-typecheck-verify-swift
func foo(x: Int) {}
foo(: 1) // expected-error{{expected argument label before colon}} expected-error{{missing argument label 'x:' in call}}