From bedfd4242fa96298b4bfc6c472e8c1fa0c7c637c Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Thu, 15 Jul 2021 23:36:44 +0100 Subject: [PATCH] Expose SealedTrait.Subtype constructor fields In some usecases, the typeclass instance of a subtype can be modified, so it is useful to allow library authors to recreate the Subtype. --- src/core/interface.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/interface.scala b/src/core/interface.scala index 161caaf8..9a85a1bc 100644 --- a/src/core/interface.scala +++ b/src/core/interface.scala @@ -85,7 +85,7 @@ object SealedTrait: val annotations: IArray[Any], val typeAnnotations: IArray[Any], val isObject: Boolean, - index: Int, + val index: Int, callByNeed: CallByNeed[Typeclass[SType]], isType: Type => Boolean, asType: Type => SType & Type @@ -109,4 +109,4 @@ final class CallByNeed[+A](private[this] var eval: () => A) extends Serializable lazy val value: A = val result = eval() eval = null - result \ No newline at end of file + result