diff options
Diffstat (limited to 'src/c.cpp')
-rw-r--r-- | src/c.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -95,7 +95,8 @@ struct CEngine : public Engine { cprot.push_back(llType(at)); } - THROW_IF(!llType(retT), Cursor(), "return has non-concrete type"); + THROW_IF(!llType(retT), Cursor(), + (format("return has non-concrete type `%1%'") % retT->str()).str()); Function* f = new Function(); f->returnType = *llType(retT); @@ -167,10 +168,11 @@ CEngine::compileLiteral(CEnv& cenv, AST* lit) CFunc CEngine::compileFunction(CEnv& cenv, AFn* fn, const AType& argsT) { - TEnv::GenericTypes::const_iterator gt = cenv.tenv.genericTypes.find(fn); - assert(gt != cenv.tenv.genericTypes.end()); + //TEnv::GenericTypes::const_iterator gt = cenv.tenv.genericTypes.find(fn); + //assert(gt != cenv.tenv.genericTypes.end()); CEngine* engine = reinterpret_cast<CEngine*>(cenv.engine()); - AType* genericType = new AType(*gt->second); + //AType* genericType = new AType(*gt->second); + AType* genericType = cenv.type(fn); AType* thisType = genericType; Subst argsSubst; |