[SR-6029] Provide a way to call generic function with a parameter for whose type a specialization exists #48586
Labels
compiler
The Swift compiler in itself
feature
A feature request or implementation
generics
Feature: generic declarations and types
swift evolution proposal needed
Flag → feature: A feature that warrants a Swift evolution proposal
Additional Detail from JIRA
md5: abc7637365fb961ed49634e84d8ba096
Issue Description:
Currently, there is no way to call a generic function with a parameter for whose type a specialization of this function exists. For instance:
It would be nicer (especially if
doGeneralStuff(...)
is inlined) if we could write something like this:Currently, this code raises
In other words, specializing overloads force us to duplicate code because they don't work in the same way as normal overloads, which can call each other without problems.
The text was updated successfully, but these errors were encountered: