File tree Expand file tree Collapse file tree 5 files changed +7
-10
lines changed
regression-tests/test-results Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -388,8 +388,8 @@ struct String
388
388
#define CPP2_MESSAGE_PARAM char const *
389
389
#define CPP2_CONTRACT_MSG cpp2::message_to_cstr_adapter
390
390
391
- auto message_to_cstr_adapter ( CPP2_MESSAGE_PARAM msg ) -> CPP2_MESSAGE_PARAM { return msg ? msg : " " ; }
392
- auto message_to_cstr_adapter ( std::string const & msg ) -> CPP2_MESSAGE_PARAM { return msg.c_str (); }
391
+ inline auto message_to_cstr_adapter ( CPP2_MESSAGE_PARAM msg ) -> CPP2_MESSAGE_PARAM { return msg ? msg : " " ; }
392
+ inline auto message_to_cstr_adapter ( std::string const & msg ) -> CPP2_MESSAGE_PARAM { return msg.c_str (); }
393
393
394
394
class contract_group {
395
395
public:
Original file line number Diff line number Diff line change 1
1
2
- cppfront compiler v0.3.0 Build 9116:1001
2
+ cppfront compiler v0.3.0 Build 9116:1317
3
3
Copyright(c) Herb Sutter All rights reserved
4
4
5
5
SPDX-License-Identifier: CC-BY-NC-ND-4.0
Original file line number Diff line number Diff line change 1
- "9116:1001 "
1
+ "9116:1317 "
Original file line number Diff line number Diff line change @@ -817,7 +817,8 @@ auto lex_line(
817
817
// If the last three tokens are "unique/shared" "." "new", add "cpp2::"
818
818
819
819
if (
820
- i >= 2
820
+ i >= 3
821
+ && (tokens[i-3 ] != " ::" && tokens[i-3 ] != " ." )
821
822
&& (tokens[i-2 ] == " unique" || tokens[i-2 ] == " shared" )
822
823
&& tokens[i-1 ] == " ."
823
824
&& tokens[i] == " new"
Original file line number Diff line number Diff line change @@ -6591,11 +6591,7 @@ class parser
6591
6591
}
6592
6592
6593
6593
else {
6594
- if (*n->identifier == " new" ) {
6595
- error ( " use 'new<" + curr ().to_string () + " >', not 'new " + curr ().to_string () + " '" , false );
6596
- return {};
6597
- }
6598
- if (*n->identifier == " co_await" || *n->identifier == " co_yield" ) {
6594
+ if (*n->identifier == " co_await" || *n->identifier == " co_yield" ) {
6599
6595
error ( " (temporary alpha limitation) coroutines are not yet supported in Cpp2" , false );
6600
6596
return {};
6601
6597
}
You can’t perform that action at this time.
0 commit comments