@@ -111,21 +111,13 @@ data class TupleLiteral(val value: List<Literal>) : Literal {
111111 }
112112}
113113
114- @Marker2
115- val List <Literal >.literal get() = TupleLiteral (this )
116-
117- @Marker2
118- @get:JvmName(" literalOrNull" )
119- val List <Literal >?.literal get() = this ?.literal ? : null .literal
120-
121- @Marker2
122- @Deprecated(" Use tupleOf(...) or .literal instead" , ReplaceWith (" tupleOf(*value)" ))
123- fun literal (vararg value : Literal ) =
124- TupleLiteral (value.asList())
114+ fun List<Literal>.toTupleLiteral () = TupleLiteral (this )
115+ fun emptyTupleLiteral () = TupleLiteral (emptyList())
116+ fun tupleLiteralOf (vararg value : Literal ) = TupleLiteral (value.asList())
125117
126118@Marker2
127- fun tupleOf ( vararg value : Literal ) =
128- TupleLiteral (value.asList())
119+ @Deprecated( " Use tupleLiteralOf(...) instead " , ReplaceWith ( " tupleLiteralOf(*value) " ))
120+ fun literal ( vararg value : Literal ) = TupleLiteral (value.asList())
129121
130122@Serializable
131123@SerialName(" struct" )
@@ -138,18 +130,10 @@ data class StructLiteral(val value: Map<String, Literal>) : Literal {
138130 }
139131}
140132
141- @Marker2
142- val Map <String , Literal >.literal get() = StructLiteral (this )
143-
144- @Marker2
145- @get:JvmName(" literalOrNull" )
146- val Map <String , Literal >?.literal get() = this ?.literal ? : null .literal
147-
148- @Marker2
149- @Deprecated(" Use structOf(...) or .literal instead" , ReplaceWith (" structOf(*value)" ))
150- fun literal (vararg value : Pair <String , Literal >) =
151- StructLiteral (value.toMap())
133+ fun Map <String , Literal >.toStructLiteral () = StructLiteral (this )
134+ fun emptyStructLiteral () = StructLiteral (emptyMap())
135+ fun structLiteralOf (vararg value : Pair <String , Literal >) = StructLiteral (value.toMap())
152136
153137@Marker2
154- fun structOf ( vararg value : Pair < String , Literal >) =
155- StructLiteral (value.toMap())
138+ @Deprecated( " Use structLiteralOf(...) instead " , ReplaceWith ( " structLiteralOf(*value) " ))
139+ fun literal ( vararg value : Pair < String , Literal >) = StructLiteral (value.toMap())
0 commit comments