Parse function type for module constants
@@ -1752,11 +1752,8 @@ where
}
// Function
- Some((start, Token::Fn, end)) => {
+ Some((start, Token::Fn, _)) => {
let _ = self.next_tok();
- if for_const {
- parse_error(ParseErrorType::NotConstType, SrcSpan { start, end })
- } else {
let _ = self.expect_one(&Token::LeftParen)?;
let args = Parser::series_of(
self,
@@ -1785,7 +1782,6 @@ where
)
}
}
- }
// Constructor function
Some((start, Token::UpName { name }, end)) => {
