From 46dd62982084dfe5712292b88047d2a58e0a420e Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 10 Nov 2014 17:31:09 +0100 Subject: Mapping types. --- Types.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Types.cpp') diff --git a/Types.cpp b/Types.cpp index 3a4112c4..e37ed3e5 100644 --- a/Types.cpp +++ b/Types.cpp @@ -63,9 +63,11 @@ shared_ptr Type::fromUserDefinedTypeName(UserDefinedTypeName const& _typeN return make_shared(*_typeName.getReferencedStruct()); } -shared_ptr Type::fromMapping(Mapping const&) +shared_ptr Type::fromMapping(Mapping const& _typeName) { - BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Mapping types not yet implemented.")); + shared_ptr keyType = _typeName.getKeyType().toType(); + shared_ptr valueType = _typeName.getValueType().toType(); + return make_shared(keyType, valueType); } shared_ptr Type::forLiteral(Literal const& _literal) -- cgit