getFunction(symbol: ts.Symbol): FunctionReference {
        assert(symbol, "symbol is undefined");

        const fun = this.functions.get(symbol);
        assert(fun, `function ${symbol.name} is not defined in scope`);