-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typesmetatypesFeature → types: MetatypesFeature → types: Metatypesregressionswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysistype declarationsFeature → declarations: Type declarationsFeature → declarations: Type declarationstypealiasFeature → type declarations: `typealias` declarationsFeature → type declarations: `typealias` declarationstypesFeature: typesFeature: types
Description
Description
No response
Reproduction
typealias A = Int
func foo(_ meta: A.Type) {
// No error.
let _ = meta<Bool>.self
}
Expected behavior
An error stating that parameter meta
cannot be specialized. Or better yet, an error stating that only references to generic type and macro declarations may be specialized.
Environment
Swift version 6.0-dev (LLVM c7c87ee42989d4b, Swift 8493312)
Target: x86_64-apple-darwin23.5.0
Additional information
No response
Metadata
Metadata
Assignees
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionsgenericsFeature: generic declarations and typesFeature: generic declarations and typesmetatypesFeature → types: MetatypesFeature → types: Metatypesregressionswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysistype declarationsFeature → declarations: Type declarationsFeature → declarations: Type declarationstypealiasFeature → type declarations: `typealias` declarationsFeature → type declarations: `typealias` declarationstypesFeature: typesFeature: types