-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(to_cpp1): emit template template parameters
- Loading branch information
Showing
7 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
regression-tests/pure2-bugfix-for-template-template-parameter.cpp2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
t: @struct <T: <_, _: _>> type = { } | ||
|
||
u: @struct <T, V: _> type = { } | ||
|
||
main: () = { _ = :t<u> = (); } |
Empty file.
Empty file.
28 changes: 28 additions & 0 deletions
28
regression-tests/test-results/pure2-bugfix-for-template-template-parameter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
#define CPP2_IMPORT_STD Yes | ||
|
||
//=== Cpp2 type declarations ==================================================== | ||
|
||
|
||
#include "cpp2util.h" | ||
|
||
template<template <typename , auto> class T> class t; | ||
|
||
template<typename T, auto V> class u; | ||
|
||
|
||
//=== Cpp2 type definitions and function declarations =========================== | ||
|
||
template<template <typename , auto> class T> class t {}; | ||
|
||
template<typename T, auto V> class u {}; | ||
|
||
auto main() -> int; | ||
|
||
|
||
//=== Cpp2 function definitions ================================================= | ||
|
||
|
||
#line 5 "pure2-bugfix-for-template-template-parameter.cpp2" | ||
auto main() -> int{static_cast<void>(t<u>{}); } | ||
|
2 changes: 2 additions & 0 deletions
2
regression-tests/test-results/pure2-bugfix-for-template-template-parameter.cpp2.output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pure2-bugfix-for-template-template-parameter.cpp2... ok (all Cpp2, passes safety checks) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters