You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ffried opened this issue
Sep 21, 2018
· 3 comments
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
checked decl cannot have error type
(parameter "closure" apiName=closure type='<<error type>>' interface type='<<error type>>')
1. While walking into decl 'Base' at <stdin>:8:1
2. While walking into body of 'init(closure:)' at <stdin>:11:4
3. While verifying VarDecl 'closure' at <stdin>:11:9
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Environment
Also happens with Swift 4.1 in Xcode 9.4.1
Additional Detail from JIRA
md5: 6a8ac680b1324b94892261f00ceb0509
relates to:
Issue Description:
The following code segfaults the compiler:
Note that just declaring the property is not enough. The initializer is necessary as well.
There are two workarounds:
Explicitly define the
typealias Value = Val
(assuming the generic parameter is namedVal
instead ofValue
)Changing the property declaration to
let closure: () -> Value
.Segfault stack trace:
The text was updated successfully, but these errors were encountered: