mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Handle pack expansion for dependent non-type template params (#6850)
https://github.com/carbon-language/carbon-lang/issues/6717
This commit is contained in:
@@ -164,6 +164,20 @@ var n: i32;
|
||||
// CHECK:STDERR:
|
||||
var x: Cpp.TwoNonType(1, &n);
|
||||
|
||||
// --- dependent_parameter_pack.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Cpp inline '''
|
||||
template<typename ...T> struct X {
|
||||
template<T... N> static int n;
|
||||
};
|
||||
''';
|
||||
|
||||
fn G() -> i32 {
|
||||
return Cpp.X(i32, i32).n(1, 2);
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- valid.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
|
||||
Reference in New Issue
Block a user