[SR-899] .self can be omitted if a function has only one parameter #43511
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 01bb7b482c4c4fc90912856191c179ba
is duplicated by:
Issue Description:
I'm wondering what the reasoning is for allowing Types to be passed into a function without explicitly declaring
.self
if there is only one function parameter.When ommitting
.self
:The function has 1 parameter: compiles
The function has > 1 parameter: Expected member name or constructor call after type name
Take the following code:
To give some background, I am trying to create a function with the signature
That can be used like so
This
get
function works if you include.self
after all of the Types, but that is not as clean and seems unnecessary unless I'm missing something.The text was updated successfully, but these errors were encountered: