Skip to content

private constructor shows up in API dump #73

@martinbonnin

Description

@martinbonnin

The following code:

class FooBar private constructor(val id: String) {
  class Builder {
    fun build() = FooBar("")
  }
}

dumps the following API:

public final class com/apollographql/apollo3/api/FooBar {
	public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
	public final fun getId ()Ljava/lang/String;
}

public final class com/apollographql/apollo3/api/FooBar$Builder {
	public fun <init> ()V
	public final fun build ()Lcom/apollographql/apollo3/api/FooBar;
}

I'm curious as to why <init> is listed in the dump. If I were to remove the id parameter, would that be considered a breaking change even if it should be an implementation detail?

I'm using 0.8.0-RC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions