From 4df5754dac59a97887bca7088a47f31064db54d6 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 27 Dec 2019 09:29:06 +0000 Subject: [PATCH] Include generics in Function cast The Kotlin compiler was happy with the old code, but IDEA wasn't. Including the generics explicitly in the cast makes both happy. --- deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt index 220f0611..f58d52ce 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/AstDeobfuscator.kt @@ -1,6 +1,7 @@ package dev.openrs2.deob.ast import com.github.javaparser.ParserConfiguration +import com.github.javaparser.ast.CompilationUnit import com.github.javaparser.printer.PrettyPrinter import com.github.javaparser.printer.PrettyPrinterConfiguration import com.github.javaparser.symbolsolver.JavaSymbolSolver @@ -59,7 +60,7 @@ class AstDeobfuscator(private val modules: List) { } } - root.printer = Function(printer::print) + root.printer = Function(printer::print) root.saveAll() } }