Skip to content

Commit a3caccd

Browse files
committed
Also allow invalid function return types
1 parent 588ae69 commit a3caccd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/modules/soul_core/heart/soul_heart_Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ struct heart::Parser : public Tokeniser<DummyKeywordMatcher,
951951
{
952952
if (matchIf (HEARTOperator::semicolon))
953953
{
954-
if (! state.function.returnType.isVoid())
954+
if (state.function.returnType.isValid() && (! state.function.returnType.isVoid()))
955955
location.throwError (Errors::expectedExpressionOfType (getTypeDescription (state.function.returnType)));
956956

957957
builder.addReturn();

0 commit comments

Comments
 (0)