Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions regression-tests/pure2-bugfix-for-bad-using-error.cpp2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main: () = {
using
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pure2-bugfix-for-bad-using-error.cpp2...
pure2-bugfix-for-bad-using-error.cpp2(3,1): error: expected valid id-expression after 'using' (at '}')

3 changes: 1 addition & 2 deletions source/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -2275,8 +2275,7 @@ struct using_statement_node
auto for_namespace() const
-> bool
{
assert(id);
return id->to_string().ends_with("::_");
return (id && id->to_string().ends_with("::_"));
}

auto position() const
Expand Down
Loading