Open
Description
class Thing<T> {
var value: T
init(_ value: T) { self.value = value }
func combineThings<each U>(head: Thing<T>, tail: repeat Thing<each U>) {
let _ = Thing<(T, repeat each U)>((head.value, repeat (each tail).value))
}
}
This crashes on the latest nightly (Swift version 5.11-dev (LLVM 82306b901067e3c, Swift cabb5e109fa373f)
) with:
SILGenExpr.cpp:6514: swift::Lowering::RValue swift::Lowering::SILGenFunction::emitRValue(swift::Expr *, swift::Lowering::SGFContext): Assertion `!E->getType()->hasLValueType() && "l-values must be emitted with emitLValue"' failed.
It does not crash on 5.9 though.
Metadata
Metadata
Assignees
Labels
Area → compiler: The SIL generation stageBug → crash: An assertion failureA deviation from expected or documented behavior. Also: expected but undesirable behavior.Feature → type declarations: Class declarationsThe Swift compiler itselfBug: A crash, i.e., an abnormal termination of softwareFeature: declarationsFeature: expressionsFeature: generic declarations and typesFeature: constant and variable declarationsFeature → expressions: Member expressionsFeature → expressions: Pack expansion expressionsFeature → generics: Parameter packs