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
typesanitizer opened this issue
Dec 8, 2020
· 4 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfSILGenArea → compiler: The SIL generation stage
You don't need the import foundation. Here's a simpler reproducer (no change to tmp.h):
publicfuncfoo() {
_ = getMyConsumingFn()
}
The type of the branch argument: $Optional<@convention(c) (@owned Optional<AnyObject>) -> ()>
The type of the block argument: $Optional<@convention(c) (Optional<AnyObject>) -> ()>
SILGen generates a switch for the Optional function type. It uses the @owned function type for the .some branch and the @unowned function type for the .none branch.
The SILVerifier is not happy about merging different function types. I'm not sure why SILGen is getting the function type wrong in the .none case.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfSILGenArea → compiler: The SIL generation stage
Additional Detail from JIRA
md5: ee693d71877c859db8a8d1e836645381
relates to:
Issue Description:
Configuration: main @ af8cf15 (release assert)
Crash message:
Reduced test case (compile with
xcrun /path/to/swiftc tmp.swift -import-objc-header tmp.h -emit-sil -o /dev/null
)The text was updated successfully, but these errors were encountered: