                     }
                 }
                 
-                private func typecheck(function: Function, stack: [Runtime<DeclarationType>], stepStack: IndexPath) throws {
+                private func typecheck(function: Function, stack: [TypecheckRuntime], stepStack: IndexPath) throws {
                     let runtime = stack.last!
                     for (i, step) in function.steps.enumerated() {
                         let stepStack = stepStack.appending(i)

        if let type = functionType.returnType {
            output.append("], returnType: .\(type)Type)\n    return {")
        } else {
            output.append("], returnType: nil)\n    return {")
        }
        if let type = functionType.returnType, case .function? = parser.typesMap[type] {
            output.append("\n        let result = decoderRuntime.run(function: function, symbols: symbols, arguments: [")

                private class Runtime<T> {
                    var results = [Int: T]()
                    let arguments: [T]
                    init(arguments: [T]) {
                        self.arguments = arguments
                    }
                }

                private class TypecheckRuntime: Runtime<DeclarationType> {
                    let returnType: DeclarationType
                    var releaseResult: [Int]
                    init(arguments: [DeclarationType], returnType: DeclarationType, count: Int) {
                        self.returnType = returnType
                        releaseResult = Array(0..<count)
                        super.init(arguments: arguments)
                    }
                }
                
