Skip to content

Commit

Permalink
Expose SealedTrait.Subtype constructor fields
Browse files Browse the repository at this point in the history
In some usecases, the typeclass instance of a subtype can be modified, so it is useful to allow library authors to recreate the Subtype.
  • Loading branch information
jatcwang committed Jul 20, 2021
1 parent fae5963 commit bedfd42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/interface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
result

0 comments on commit bedfd42

Please sign in to comment.