diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parse/expr.cpp | 2 | ||||
-rw-r--r-- | src/types.cpp | 2 | ||||
-rw-r--r-- | src/types.hpp | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index b07567a7..10a49dd8 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -76,6 +76,8 @@ ExprNodeP Parse_ExprBlockNode(TokenStream& lex) GET_CHECK_TOK(tok, lex, TOK_SQUARE_CLOSE);
break;
// Items:
+ case TOK_RWORD_PUB:
+ GET_TOK(tok, lex);
case TOK_RWORD_TYPE:
case TOK_RWORD_USE:
case TOK_RWORD_EXTERN:
diff --git a/src/types.cpp b/src/types.cpp index b056bf94..d8e655e6 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -103,7 +103,7 @@ TypeRef::TypeRef(const TypeRef& other) #define _CLONE(VAR, code...) case TypeData::TAG_##VAR: { auto& old = other.m_data.as_##VAR(); m_data = TypeData::make_##VAR(code); } break; _COPY(None) _COPY(Any) - case TypeData::TAG_Macro: throw ::std::runtime_error("Copying an unexpanded type macro"); + case TypeData::TAG_Macro: assert( !"Copying an unexpanded type macro" ); _COPY(Unit) _COPY(Primitive) _COPY(Function) diff --git a/src/types.hpp b/src/types.hpp index f70de94a..2b9f4a86 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -113,6 +113,10 @@ public: {}
TypeRef(const TypeRef& other);
+ TypeRef& operator=(TypeRef&& other) {
+ m_data = mv$( other.m_data );
+ return *this;
+ }
TypeRef& operator=(const TypeRef& other) {
m_data = TypeRef(other).m_data;
return *this;
|