Skip to content

Commit

Permalink
Remove some leftover data classes
Browse files Browse the repository at this point in the history
They were missed due to a bug in the data class detection
(see previous commit).
  • Loading branch information
rock3r committed Oct 22, 2023
1 parent 40ca6d2 commit 2f76bf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
14 changes: 0 additions & 14 deletions foundation/api/foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,6 @@ public final class org/jetbrains/jewel/foundation/lazy/tree/ChildrenGeneratorSco
public final class org/jetbrains/jewel/foundation/lazy/tree/ChildrenGeneratorScope$ParentInfo {
public static final field $stable I
public fun <init> (Ljava/lang/Object;II)V
public final fun component1 ()Ljava/lang/Object;
public final fun component2 ()I
public final fun component3 ()I
public final fun copy (Ljava/lang/Object;II)Lorg/jetbrains/jewel/foundation/lazy/tree/ChildrenGeneratorScope$ParentInfo;
public static synthetic fun copy$default (Lorg/jetbrains/jewel/foundation/lazy/tree/ChildrenGeneratorScope$ParentInfo;Ljava/lang/Object;IIILjava/lang/Object;)Lorg/jetbrains/jewel/foundation/lazy/tree/ChildrenGeneratorScope$ParentInfo;
public fun equals (Ljava/lang/Object;)Z
public final fun getData ()Ljava/lang/Object;
public final fun getDepth ()I
Expand Down Expand Up @@ -558,10 +553,6 @@ public abstract class org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Eleme
public final class org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Leaf : org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element {
public static final field $stable I
public fun <init> (Ljava/lang/Object;Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public final fun component2 ()Ljava/lang/Object;
public final fun copy (Ljava/lang/Object;Ljava/lang/Object;)Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Leaf;
public static synthetic fun copy$default (Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Leaf;Ljava/lang/Object;Ljava/lang/Object;ILjava/lang/Object;)Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Leaf;
public fun equals (Ljava/lang/Object;)Z
public final fun getData ()Ljava/lang/Object;
public fun getId ()Ljava/lang/Object;
Expand All @@ -572,11 +563,6 @@ public final class org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$
public final class org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Node : org/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element {
public static final field $stable I
public fun <init> (Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)V
public final fun component1 ()Ljava/lang/Object;
public final fun component2 ()Ljava/lang/Object;
public final fun component3 ()Lkotlin/jvm/functions/Function1;
public final fun copy (Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Node;
public static synthetic fun copy$default (Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Node;Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/jetbrains/jewel/foundation/lazy/tree/TreeBuilder$Element$Node;
public fun equals (Ljava/lang/Object;)Z
public final fun getChildrenGenerator ()Lkotlin/jvm/functions/Function1;
public final fun getData ()Ljava/lang/Object;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jetbrains.jewel.foundation.lazy.tree

import org.jetbrains.jewel.foundation.GenerateDataFunctions
import java.io.File
import java.nio.file.Path

Expand All @@ -11,8 +12,11 @@ class TreeBuilder<T> : TreeGeneratorScope<T> {

abstract val id: Any?

data class Leaf<T>(val data: T, override val id: Any?) : Element<T>()
data class Node<T>(
@GenerateDataFunctions
class Leaf<T>(val data: T, override val id: Any?) : Element<T>()

@GenerateDataFunctions
class Node<T>(
val data: T,
override val id: Any?,
val childrenGenerator: ChildrenGeneratorScope<T>.() -> Unit,
Expand Down Expand Up @@ -130,7 +134,8 @@ interface TreeGeneratorScope<T> {

class ChildrenGeneratorScope<T>(private val parentElement: Tree.Element.Node<T>) : TreeGeneratorScope<T> {

data class ParentInfo<T>(val data: T, val depth: Int, val index: Int)
@GenerateDataFunctions
class ParentInfo<T>(val data: T, val depth: Int, val index: Int)

val parent by lazy { ParentInfo(parentElement.data, parentElement.depth, parentElement.childIndex) }

Expand Down

0 comments on commit 2f76bf8

Please sign in to comment.