Non generic functions accept generic specialization syntax in some cases #73749
Labels
accepts invalid
Bug: Accepts invalid
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
expressions
Feature: expressions
generics
Feature: generic declarations and types
swift 6.0
type checker
Area → compiler: Semantic analysis
Description
Swift is allowing a syntax mistake.
Reproduction
It seems that a function can "accept" explicit generic parameters in this situation:
It does not seem to happen when either of the overloads is commented out, catching the invalid syntax.
Expected behavior
An error message detecting the misleading syntax.
Environment
Additional information
No response
The text was updated successfully, but these errors were encountered: