swiftlang/swift
Auf GitHub ansehen[SR-764] swiftc calls default initializers "synthesized initializers"
Open
#43.376 geöffnet am 18. Feb. 2016
bugclasscompilerdiagnostics qualitygood first issuepropertiestype checker
Repository-Metriken
- Stars
- (69.989 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 8T 17h) (510 gemergte PRs in 30 T)
Beschreibung
| Previous ID | SR-764 |
| Radar | None |
| Original Reporter | jaybuff (JIRA User) |
| Type | Bug |
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, DiagnosticsQoI |
| Assignee | None |
| Priority | Medium |
md5: 1956d3a3ee2e5ca9643b40e9f5d947b5
Issue Description:
$ cat Circle.swift
class Circle {
var radius: Int
}
$ swiftc Circle.swift
Circle.swift:1:7: error: class 'Circle' has no initializers
class Circle {
^
Circle.swift:2:9: note: stored property 'radius' without initial value prevents synthesized initializers
var radius: Int
^
= 0
Note that the error refers to "synthesized initializers" The canonical swift book refers to these as "Default Initializers"
Either the book or the compiler error message should be changed to consistently call these the same thing.