We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f045829 commit da7149aCopy full SHA for da7149a
lib/AST/ParameterPack.cpp
@@ -301,7 +301,12 @@ PackType *PackType::getSingletonPackExpansion(Type param) {
301
}
302
303
CanPackType CanPackType::getSingletonPackExpansion(CanType param) {
304
- return CanPackType(PackType::getSingletonPackExpansion(param));
+ // Note: You can't just wrap the result in CanPackType() here because
305
+ // PackExpansionType has the additional requirement that the count type
306
+ // must be a reduced shape.
307
+ return cast<PackType>(
308
+ PackType::getSingletonPackExpansion(param)
309
+ ->getCanonicalType());
310
311
312
PackExpansionType *PackType::unwrapSingletonPackExpansion() const {
0 commit comments