Skip to content

Commit cd07ac6

Browse files
ntrelzaucy
authored andcommitted
Add hint when parsing type from Cpp1 T* (hsutter#734)
1 parent 8d1987a commit cd07ac6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/parse.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6003,6 +6003,10 @@ class parser
60036003
}
60046004
return {};
60056005
}
6006+
if (curr().type() == lexeme::Multiply) {
6007+
error("'T*' is not a valid Cpp2 type; use '*T' for a pointer instead", false);
6008+
return {};
6009+
}
60066010

60076011
return n;
60086012
}

0 commit comments

Comments
 (0)