swiftlang/swift

No fix-it for missing type annotation in computed property

Aberta

#87.324 aberto em 18 de fev. de 2026

 (1 comentário) (0 reação) (1 responsável)Swift (10.719 forks)batch import
compilerdiagnostics qualityfix-itsgood first issuelet & varswift 6.3type checker

Métricas do repositório

Stars
 (69.989 estrelas)
Métricas de merge de PR
 (Mesclagem média 8d 17h) (510 fundiu PRs em 30d)

Description

Description

No response

Reproduction

func foo() {
  var int {}
}
error: computed property must have an explicit type [computed_property_missing_type]
  91 | 
  92 | func foo() {
  93 |   var int {}
     |       `- error: computed property must have an explicit type [computed_property_missing_type]
  94 | }
  95 | 

Expected behavior

Insertion fix-it for the annotation with a type placeholder.

Environment

Swift version 6.3-dev (fddce85428f14f8)

Additional information

No response

Guia do colaborador