[SR-11378] Improve func callAsFunction
diagnostics
#53779
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: e0a97d278a6a15779fcdb86aed9abd58
Issue Description:
Callable values of user-defined nominal types was introduced in SE-0253 (implementation PR).
Methods named
func callAsFunction
act as call-syntax delegate methods.Ideally, the diagnostics for sugared calls should exactly match the diagnostics for direct calls to
callAsFunction
, but this requires more work.Examples
These examples are documented in test/Sema/call_as_function_simple.swift.
"Cannot use mutating member on immutable value."
"Extra argument in call."
The text was updated successfully, but these errors were encountered: