From 8a3170225357479071fb38d3e116ed66f8b6fa89 Mon Sep 17 00:00:00 2001 From: Martin Duhem Date: Mon, 17 Aug 2015 16:31:09 +0200 Subject: [PATCH] Add overloads to restore binary compatibility --- compile/api/src/main/scala/xsbt/api/HashAPI.scala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compile/api/src/main/scala/xsbt/api/HashAPI.scala b/compile/api/src/main/scala/xsbt/api/HashAPI.scala index 56485373b..6ed4054e0 100644 --- a/compile/api/src/main/scala/xsbt/api/HashAPI.scala +++ b/compile/api/src/main/scala/xsbt/api/HashAPI.scala @@ -278,7 +278,7 @@ final class HashAPI(includePrivate: Boolean, includeParamNames: Boolean, include hashSeq(ts, (t: Type) => hashType(t, includeDefinitions)) def hashType(t: Type, includeDefinitions: Boolean = true): Unit = t match { - case s: Structure => hashStructure(s, includeDefinitions) + case s: Structure => hashStructure(s, includeDefinitions, isTrait = false) case e: Existential => hashExistential(e) case c: Constant => hashConstant(c) case p: Polymorphic => hashPolymorphic(p) @@ -345,8 +345,14 @@ final class HashAPI(includePrivate: Boolean, includeParamNames: Boolean, include hashType(a.baseType) hashAnnotations(a.annotations) } - final def hashStructure(structure: Structure, includeDefinitions: Boolean, isTrait: Boolean = false) = + @deprecated("Use the overload that indicates if the definition is a trait.", "0.14") + final def hashStructure(structure: Structure, includeDefinitions: Boolean): Unit = + hashStructure(structure, includeDefinitions, isTrait = false) + final def hashStructure(structure: Structure, includeDefinitions: Boolean, isTrait: Boolean = false): Unit = visit(visitedStructures, structure)(structure => hashStructure0(structure, includeDefinitions, isTrait)) + @deprecated("Use the overload that indicates if the definition is a trait.", "0.14") + def hashStructure0(structure: Structure, includeDefinitions: Boolean): Unit = + hashStructure0(structure, includeDefinitions, isTrait = false) def hashStructure0(structure: Structure, includeDefinitions: Boolean, isTrait: Boolean = false): Unit = { extend(StructureHash) hashTypes(structure.parents, includeDefinitions)