From c805e9e03db7e7b48f04824ccf5e625a20032af9 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 19 Aug 2016 22:08:24 +0800 Subject: AST - Support ! as a real type --- src/parse/types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parse/types.cpp') diff --git a/src/parse/types.cpp b/src/parse/types.cpp index 34afc484..d960d1d3 100644 --- a/src/parse/types.cpp +++ b/src/parse/types.cpp @@ -40,7 +40,7 @@ TypeRef Parse_Type_Int(TokenStream& lex, bool allow_trait_list) return TypeRef(TypeRef::TagMacro(), Parse_MacroInvocation(ps, AST::MetaItems(), mv$(tok.str()), lex)); // '!' - Only ever used as part of function prototypes, but is kinda a type... not allowed here though case TOK_EXCLAM: - throw ParseError::Generic(lex, "! is not a real type"); + return TypeRef( Span(tok.get_pos()), TypeData::make_Bang({}) ); // '_' = Wildcard (type inferrence variable) case TOK_UNDERSCORE: return TypeRef(Span(tok.get_pos())); -- cgit v1.2.3