From e4e710eb0b752981b61af1f09884d4ec12f6ddc1 Mon Sep 17 00:00:00 2001 From: "John Hodge (sonata)" Date: Sat, 17 Jan 2015 15:06:17 +0800 Subject: Disabled generic handling in Path::resolve (leave for typecheck pass) --- src/ast/path.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ast/path.cpp b/src/ast/path.cpp index 56d06eaf..acd92dd8 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -227,12 +227,12 @@ void Path::bind_enum(const Enum& ent, const ::std::vector& args) DEBUG("Bound to enum"); m_binding_type = ENUM; m_binding.enum_ = &ent; - if( args.size() > 0 ) - { - if( args.size() != ent.params().size() ) - throw ParseError::Generic("Parameter count mismatch"); - throw ParseError::Todo("Bind enum with params passed"); - } + //if( args.size() > 0 ) + //{ + // if( args.size() != ent.params().size() ) + // throw ParseError::Generic("Parameter count mismatch"); + // throw ParseError::Todo("Bind enum with params passed"); + //} } void Path::bind_enum_var(const Enum& ent, const ::std::string& name, const ::std::vector& args) { @@ -246,12 +246,12 @@ void Path::bind_enum_var(const Enum& ent, const ::std::string& name, const ::std if( idx == ent.variants().size() ) throw ParseError::Generic("Enum variant not found"); - if( args.size() > 0 ) - { - if( args.size() != ent.params().size() ) - throw ParseError::Generic("Parameter count mismatch"); - throw ParseError::Todo("Bind enum variant with params passed"); - } + //if( args.size() > 0 ) + //{ + // if( args.size() != ent.params().size() ) + // throw ParseError::Generic("Parameter count mismatch"); + // throw ParseError::Todo("Bind enum variant with params passed"); + //} DEBUG("Bound to enum variant '" << name << "' (#" << idx << ")"); m_binding_type = ENUM_VAR; -- cgit v1.2.3