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
886886 out of a module (which is the case e.g. in MSVC's implementation of ``std `` module). (#GH118218)
887887- Fixed a pack expansion issue in checking unexpanded parameter sizes. (#GH17042)
888888- 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)
889890
890891Bug Fixes to AST Handling
891892^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -1722,7 +1722,7 @@ PackIndexingExpr *PackIndexingExpr::Create(
17221722 if (Index && FullySubstituted && !SubstitutedExprs.empty ())
17231723 Type = SubstitutedExprs[*Index]->getType ();
17241724 else
1725- Type = Context. DependentTy ;
1725+ Type = PackIdExpr-> getType () ;
17261726
17271727 void *Storage =
17281728 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_ {
305305mdispatch_<int , int > d;
306306
307307} // 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