Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ktype overrides #77

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:
uses: gradle/actions/setup-gradle@v3

- name: Test
run: ./gradlew check
run: |
# Run compileCommonMainKotlinMetadata to ensure metadata compilation works too, as it's
# not covered under the normal check command
./gradlew check compileCommonMainKotlinMetadata

- name: Publish (default branch only)
if: github.repository == 'slackhq/EitherNet' && github.ref == 'refs/heads/main'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ internal expect class KTypeImpl(
arguments: List<KTypeProjection>,
isMarkedNullable: Boolean,
annotations: List<Annotation>,
) : KType, EitherNetKType
) : KType, EitherNetKType {
override val classifier: KClassifier?
override val arguments: List<KTypeProjection>
override val isMarkedNullable: Boolean
override val annotations: List<Annotation>
}

@InternalEitherNetApi
public fun KType.canonicalize(): KType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ internal actual val KClass<*>.qualifiedNameForComparison: String?

internal actual class KTypeImpl
actual constructor(
override val classifier: KClassifier?,
override val arguments: List<KTypeProjection>,
override val isMarkedNullable: Boolean,
override val annotations: List<Annotation>,
actual override val classifier: KClassifier?,
actual override val arguments: List<KTypeProjection>,
actual override val isMarkedNullable: Boolean,
actual override val annotations: List<Annotation>,
) : KType, EitherNetKType {
private val impl = EitherNetKTypeImpl(classifier, arguments, isMarkedNullable, annotations)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ internal actual val KClass<*>.qualifiedNameForComparison: String?

internal actual class KTypeImpl
actual constructor(
override val classifier: KClassifier?,
override val arguments: List<KTypeProjection>,
override val isMarkedNullable: Boolean,
override val annotations: List<Annotation>,
actual override val classifier: KClassifier?,
actual override val arguments: List<KTypeProjection>,
actual override val isMarkedNullable: Boolean,
actual override val annotations: List<Annotation>,
) : KType, EitherNetKType {
private val impl = EitherNetKTypeImpl(classifier, arguments, isMarkedNullable, annotations)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ internal actual val KClass<*>.qualifiedNameForComparison: String?

internal actual class KTypeImpl
actual constructor(
override val classifier: KClassifier?,
override val arguments: List<KTypeProjection>,
override val isMarkedNullable: Boolean,
override val annotations: List<Annotation>,
actual override val classifier: KClassifier?,
actual override val arguments: List<KTypeProjection>,
actual override val isMarkedNullable: Boolean,
actual override val annotations: List<Annotation>,
) : KType, EitherNetKType {
private val impl = EitherNetKTypeImpl(classifier, arguments, isMarkedNullable, annotations)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ internal actual val KClass<*>.qualifiedNameForComparison: String?

internal actual class KTypeImpl
actual constructor(
override val classifier: KClassifier?,
override val arguments: List<KTypeProjection>,
override val isMarkedNullable: Boolean,
override val annotations: List<Annotation>,
actual override val classifier: KClassifier?,
actual override val arguments: List<KTypeProjection>,
actual override val isMarkedNullable: Boolean,
actual override val annotations: List<Annotation>,
) : KType, EitherNetKType {
private val impl = EitherNetKTypeImpl(classifier, arguments, isMarkedNullable, annotations)

Expand Down