mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Reverse Interop: Class declarations
Generate class declarations for Carbon classes referenced from C++
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
package Other;
|
||||
namespace Nested;
|
||||
namespace Nested.Again;
|
||||
|
||||
class Class1;
|
||||
// --- namespace.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
@@ -23,4 +25,14 @@ import Cpp inline '''
|
||||
namespace X = Carbon::Other;
|
||||
namespace Y = Carbon::Other::Nested;
|
||||
namespace Z = Carbon::Other::Nested::Again;
|
||||
Carbon::Other::Class1 *glbl;
|
||||
|
||||
template<typename T> void f1() {
|
||||
T* v;
|
||||
}
|
||||
|
||||
void f2() {
|
||||
f1<Carbon::Other::Class1>();
|
||||
}
|
||||
|
||||
''';
|
||||
|
||||
Reference in New Issue
Block a user