swiftlang/swift

No fix-it for missing type annotation in computed property

開放

#87,324 建立於 2026年2月18日

 (1 則留言) (0 個反應) (1 位負責人)Swift (10,719 個分叉)batch import
compilerdiagnostics qualityfix-itsgood first issuelet & varswift 6.3type checker

倉庫指標

星標
 (69,989 顆星)
PR 合併指標
 (平均合併 8天 17小時) (30 天內合併 510 個 PR)

描述

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

貢獻者指南