diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-17 15:06:17 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-17 15:06:17 +0800 |
commit | e4e710eb0b752981b61af1f09884d4ec12f6ddc1 (patch) | |
tree | 2d868dd773de70dad60657d5da028889f54279ea /src | |
parent | 0eaa7a5a300de625dfa813f49b04407c9f0a4feb (diff) | |
download | mrust-e4e710eb0b752981b61af1f09884d4ec12f6ddc1.tar.gz |
Disabled generic handling in Path::resolve (leave for typecheck pass)
Diffstat (limited to 'src')
-rw-r--r-- | src/ast/path.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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<TypeRef>& 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<TypeRef>& 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; |