aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp6
1 files changed, 4 insertions, 2 deletions
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> Type::fromUserDefinedTypeName(UserDefinedTypeName const& _typeN
return make_shared<StructType>(*_typeName.getReferencedStruct());
}
-shared_ptr<Type> Type::fromMapping(Mapping const&)
+shared_ptr<Type> Type::fromMapping(Mapping const& _typeName)
{
- BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Mapping types not yet implemented."));
+ shared_ptr<Type const> keyType = _typeName.getKeyType().toType();
+ shared_ptr<Type const> valueType = _typeName.getValueType().toType();
+ return make_shared<MappingType>(keyType, valueType);
}
shared_ptr<Type> Type::forLiteral(Literal const& _literal)