Skip to content

Conversation

@koperagen
Copy link
Collaborator

Problem can be seen here
#526

@koperagen koperagen requested a review from zaleslaw December 15, 2023 19:11
class ValueClassConverter(val unbox: Method, val box: Method)

val valueClassConverter = (it.returnType.classifier as? KClass<*>)?.let { kClass ->
if (!kClass.isValue) return@let null else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need explicit return here? This seems readable enough:

if (!kClass.isValue) null else { 
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, thank you


@Test
fun valueClassNullableField() {
val segments = listOf(PathSegment("foo", Speed(2.3)), PathSegment("bar",))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove trailing comma

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated formatting here

@koperagen koperagen force-pushed the fix-toDataFrame-valueclass branch from 8fd4763 to 7ac540a Compare December 18, 2023 15:17
@koperagen koperagen merged commit ff20e53 into master Dec 19, 2023
@Jolanrensen Jolanrensen deleted the fix-toDataFrame-valueclass branch March 22, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants