Closed
Description
Describe the bug
A clear and concise description of what the bug is.
export module a;
doesn't work in-pure-cpp2
mode.#include "cpp2util.h"
should be inserted in the GMF.
Additional work might also be necessary.- No declaration can be
export
ed. It's not part of the grammar, and as such can't happen in the generated code.
I suppose one can also run into an issue due to the lack of support forinline
, similar to Fix duplicate symbol of cpp2::args() function #268.
To Reproduce
Steps to reproduce the behavior:
- Sample code - distilled down to minimal essentials please
- Command lines including which C++ compiler you are using
- Happens at the
cppfront
level. - TBD
- Happens at the
cppfront
level.
- Happens at the
- Expected result - what you expected to happen
- Cpp2 supports exporting modules.
- The functionality provided by the generated
#include "cpp2util.h"
also works in module units. - Declarations can be
export
ed.
- Actual result/error
-
example.cpp2(1,1): error: pure-cpp2 switch disables Cpp1 syntax
-
error: declaration of 'operator new' in module main follows declaration in the global module
-
example.cpp2(2,13): error: missing semicolon at end of declaration (at 'namespace') example.cpp2(2,1): error: unexpected text at end of Cpp2 code section (at 'ns') example.cpp2(2,0): error: parse failed for section starting here
-
Additional context
Add any other context about the problem here.