File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -886,6 +886,7 @@ Bug Fixes to C++ Support
886
886
out of a module (which is the case e.g. in MSVC's implementation of ``std `` module). (#GH118218)
887
887
- Fixed a pack expansion issue in checking unexpanded parameter sizes. (#GH17042)
888
888
- Fixed a bug where captured structured bindings were modifiable inside non-mutable lambda (#GH95081)
889
+ - Fixed an issue while resolving type of expression indexing into a pack of values of non-dependent type (#GH121242)
889
890
890
891
Bug Fixes to AST Handling
891
892
^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -1722,7 +1722,7 @@ PackIndexingExpr *PackIndexingExpr::Create(
1722
1722
if (Index && FullySubstituted && !SubstitutedExprs.empty ())
1723
1723
Type = SubstitutedExprs[*Index]->getType ();
1724
1724
else
1725
- Type = Context. DependentTy ;
1725
+ Type = PackIdExpr-> getType () ;
1726
1726
1727
1727
void *Storage =
1728
1728
Context.Allocate (totalSizeToAlloc<Expr *>(SubstitutedExprs.size ()));
Original file line number Diff line number Diff line change @@ -305,3 +305,19 @@ template <class... Args> struct mdispatch_ {
305
305
mdispatch_<int , int > d;
306
306
307
307
} // namespace GH116105
308
+
309
+ namespace GH121242 {
310
+ // Non-dependent type pack access
311
+ template <int ...x>
312
+ int y = x...[0 ];
313
+
314
+ struct X {};
315
+
316
+ template <X...x>
317
+ X z = x...[0 ];
318
+
319
+ void foo () {
320
+ (void )y<0 >;
321
+ (void )z<X{}>;
322
+ }
323
+ } // namespace GH121242
You can’t perform that action at this time.
0 commit comments