From f2635289b1923866843e1dd47423bd6ca74c2cb1 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Fri, 21 Aug 2020 16:29:39 +0200 Subject: Replace SelfType with family of RecursiveTypes --- core/src/main/kotlin/links/DRI.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src/main/kotlin') diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt index e73c2faa..8dfac80c 100644 --- a/core/src/main/kotlin/links/DRI.kt +++ b/core/src/main/kotlin/links/DRI.kt @@ -68,8 +68,8 @@ data class TypeConstructor( (if (params.isNotEmpty()) "[${params.joinToString(",")}]" else "") } -object SelfType : TypeReference() { - override fun toString() = "^" +data class RecursiveType(val rank: Int): TypeReference() { + override fun toString() = "^".repeat(rank + 1) } data class Nullable(val wrapped: TypeReference) : TypeReference() { -- cgit