| 314 | } |
| 315 | |
| 316 | experimental::Type TypeSystem::type(TypeConstructor _constructor, std::vector<Type> _arguments) const |
| 317 | { |
| 318 | // TODO: proper error handling |
| 319 | auto const& info = m_typeConstructors.at(_constructor.m_index); |
| 320 | solAssert( |
| 321 | info.arguments() == _arguments.size(), |
| 322 | fmt::format("Type constructor '{}' accepts {} type arguments (got {}).", constructorInfo(_constructor).name, info.arguments(), _arguments.size()) |
| 323 | ); |
| 324 | return TypeConstant{_constructor, _arguments}; |
| 325 | } |
| 326 | |
| 327 | experimental::Type TypeEnvironment::fresh(Type _type) |
| 328 | { |
no test coverage detected