Stdlib generators: change values back to function.
This commit is contained in:
@@ -42,7 +42,7 @@ enum class PrimitiveType {
|
|||||||
Double;
|
Double;
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val defaultPrimitives = PrimitiveType.values.toSet()
|
val defaultPrimitives = PrimitiveType.values().toSet()
|
||||||
val numericPrimitives = setOf(Int, Long, Byte, Short, Double, Float)
|
val numericPrimitives = setOf(Int, Long, Byte, Short, Double, Float)
|
||||||
val integralPrimitives = setOf(Int, Long, Byte, Short, Char)
|
val integralPrimitives = setOf(Int, Long, Byte, Short, Char)
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ class GenericFunction(val signature: String, val keyword: String = "fun") {
|
|||||||
buildPrimitives.addAll(p.toList())
|
buildPrimitives.addAll(p.toList())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun instantiate(vararg families: Family = Family.values): List<ConcreteFunction> {
|
fun instantiate(vararg families: Family = Family.values()): List<ConcreteFunction> {
|
||||||
return families
|
return families
|
||||||
.sortedBy { it.name }
|
.sortedBy { it.name }
|
||||||
.filter { buildFamilies.contains(it) }
|
.filter { buildFamilies.contains(it) }
|
||||||
@@ -205,7 +205,7 @@ class GenericFunction(val signature: String, val keyword: String = "fun") {
|
|||||||
Primitives, Generic -> SourceFile.Misc
|
Primitives, Generic -> SourceFile.Misc
|
||||||
}
|
}
|
||||||
|
|
||||||
fun build(vararg families: Family = Family.values): String {
|
fun build(vararg families: Family = Family.values()): String {
|
||||||
val builder = StringBuilder()
|
val builder = StringBuilder()
|
||||||
for (family in families.sortedBy { it.name }) {
|
for (family in families.sortedBy { it.name }) {
|
||||||
if (buildFamilies.contains(family))
|
if (buildFamilies.contains(family))
|
||||||
|
|||||||
Reference in New Issue
Block a user