Skip to content

Commit

Permalink
Remove requirement for constructor presence
Browse files Browse the repository at this point in the history
  • Loading branch information
chippmann committed Nov 3, 2024
1 parent 779d7b5 commit c8cb940
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,6 @@ class ClassBuilderDsl<T : KtObject>(
}

internal fun build(): KtClass<T> {
if (!isAbstract) {
check(constructors.isNotEmpty()) { "Please provide at least one constructor." }
}
// Constraints.MAX_CONSTRUCTOR_ARG_COUNT + 1 because we have no arg constructor.
val constructorArray = arrayOfNulls<KtConstructor<T>>(Constraints.MAX_CONSTRUCTOR_ARG_COUNT + 1)
constructors.forEach {
Expand Down

0 comments on commit c8cb940

Please sign in to comment.