-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
CodableArea → standard library: `Codable` and co.Area → standard library: `Codable` and co.bugA 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 itself
Description
Previous ID | SR-7315 |
Radar | rdar://problem/39102390 |
Original Reporter | @hamishknight |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Swift version 4.2-dev (LLVM 95345677bd, Clang daefc772c1, Swift 76c264e)
Target: x86_64-apple-darwin17.4.0
Additional Detail from JIRA
Votes | 18 |
Component/s | Compiler |
Labels | Bug, Codable |
Assignee | @slavapestov |
Priority | Medium |
md5: 041c433776ada41d9784d150b3a3cc07
Issue Description:
The following Swift files fail to compile:
class C1 : Decodable { // error: Class 'C1' has no initializers
let str: String
}
class C : Decodable {
let c1: C1
}
But they really should as we should be synthesising an init(from:)
for C1
. Note that the above example does compile with whole module optimisation enabled if the file a.swift comes before b.swift.
Metadata
Metadata
Assignees
Labels
CodableArea → standard library: `Codable` and co.Area → standard library: `Codable` and co.bugA 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 itself