Open swift-ci opened 3 years ago
Triggers an assertion failure on main
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 269.
<snip>
1. Swift version 5.5-dev (LLVM 071fc2d8d3e9985, Swift 3bb294521f6c68f)
<snip>
4. While silgen emitConstructor SIL function "@$s3tmp13SettingsGroupV8settingsACSayAA7SettingVGyXE_tcfC".
for 'init(settings:)' (at tmp.swift:3:8)
<snip>
5 libsystem_c.dylib 0x00007fff20284f10 abort + 123
6 libsystem_c.dylib 0x00007fff202842e3 err + 0
7 swift-frontend 0x000000010ce7a6b3 swift::CanTypeWrapperTraits<swift::ReferenceStorageType>::type swift::SILType::castTo<swift::ReferenceStorageType>() const (.cold.3) + 35
8 swift-frontend 0x00000001087c775b swift::CanTypeWrapperTraits<swift::ReferenceStorageType>::type swift::SILType::castTo<swift::ReferenceStorageType>() const + 91
9 swift-frontend 0x00000001087c84b4 swift::Lowering::SILGenFunction::emitConversionFromSemanticValue(swift::SILLocation, swift::SILValue, swift::SILType) + 68
10 swift-frontend 0x000000010872f1f5 swift::Lowering::RValue::forwardAsSingleStorageValue(swift::Lowering::SILGenFunction&, swift::SILType, swift::SILLocation) && + 165
Thanks for the reduced example.
@swift-ci create
Environment
macOS 11.4 (20F71) Xcode Version 12.5 (12E262) Xcode Version 13.0 beta (13A5154h)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: d6a82dc581684f2e27d3e2719c342af5Issue Description:
Using not structurally resemble function type in with an implicit memberwise initializer leads to a compilation crash: