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 | |
parent | 0eaa7a5a300de625dfa813f49b04407c9f0a4feb (diff) | |
download | mrust-e4e710eb0b752981b61af1f09884d4ec12f6ddc1.tar.gz |
Disabled generic handling in Path::resolve (leave for typecheck pass)
-rw-r--r-- | samples/1.rs | 2 | ||||
-rw-r--r-- | src/ast/path.cpp | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/samples/1.rs b/samples/1.rs index ce53ba54..f27b8611 100644 --- a/samples/1.rs +++ b/samples/1.rs @@ -111,7 +111,7 @@ impl<T:Reader> Iterator<IoResult<char>> for UTF8Reader<T> // - Error, check if it's EOF
Err(e) => match e.kind {
// Return 'None' on EOF (end of stream)
- ::std::io::EndOfFile => None,
+ ::std::io::IoError::EndOfFile => None,
_ => Some( Err( e ) ),
}
}
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; |