blob: 719db72731d1394774d39a74201c6f52e0828565 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/**
** \file overload/type-checker.hh
** \brief Checking/translating an OverTiger program in a Tiger program.
*/
#pragma once
#include <overload/binder.hh>
#include <type/type-checker.hh>
#include <type/types.hh>
namespace overload
{
/** \brief Perform type checking, allowing function overload, and compute
** the bindings of the functions.
**
** Inheritance is declared virtual to enable diamond inheritance with
** the combine::TypeChecker (src/combine/type-checker.hh), inheriting
** from overload::TypeChecker and object::TypeChecker, both inheriting from
** type::TypeChecker.
**/
class TypeChecker : virtual public type::TypeChecker
{
public:
/// Superclass.
using super_type = type::TypeChecker;
using super_type::operator();
TypeChecker(const overfun_bindings_type& overfun_bindings);
virtual ~TypeChecker() = default;
// FIXME: Some code was deleted here.
private:
const overfun_bindings_type& overfun_bindings_;
};
} // namespace overload
|