summaryrefslogtreecommitdiff
path: root/src/ast/ast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r--src/ast/ast.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index 80182f85..70a61b32 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -320,6 +320,9 @@ Function::Function(Span sp, GenericParams params, TypeRef ret_type, Arglist args
TU_IFLET( ::AST::Path::Class, e.path.m_class, Relative, pe,
if( pe.nodes.size() == 1 && pe.nodes.front().name() == "Box" )
{
+ if( pe.nodes.front().args().m_types.size() != 1 ) {
+ ERROR(sp, E0000, "Box takes 1 argument - " << ty);
+ }
// HACK: Assumes that the param is Self or equivalent
m_receiver = Receiver::Box;
}