Skip to content

Conversation

@vshcryabets
Copy link
Owner

No description provided.

@vshcryabets vshcryabets requested a review from Copilot October 2, 2025 17:02
@vshcryabets vshcryabets self-assigned this Oct 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces C++ array data type handling by adding a new GetArrayDataTypeUseCase class and updating related components. The changes implement C++ std::vector type mappings for various primitive and custom data types.

Key changes:

  • Added GetArrayDataTypeUseCase class to handle C++ array type mappings
  • Updated GetTypeNameUseCase to use the new array data type handler
  • Removed incorrect Kotlin import from PrepareRightValueUseCase

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
GetArrayDataTypeUseCase.kt New class implementing C++ array type mappings using std::vector
GetArrayDataTypeUseCaseTest.kt Comprehensive test coverage for the new array data type use case
GetTypeNameUseCase.kt New type name resolution class utilizing the array data type handler
PrepareRightValueUseCaseTest.kt Test class for right value preparation functionality
PrepareRightValueUseCase.kt Removed incorrect Kotlin import reference
CppEnumGeneratorTest.kt Updated test with additional dependencies and test cases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

is DataType.custom -> type.block.name
is DataType.userClassTest2 -> type.node.getPath()
else -> "ktQQTP_$type"
} + (if (type.canBeNull) "?" else "")
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The nullable syntax ? is Kotlin-specific and not valid for C++. C++ uses pointers or optional types for nullable values.

Suggested change
} + (if (type.canBeNull) "?" else "")
}.let { typeName -> if (type.canBeNull) "std::optional<$typeName>" else typeName }

Copilot uses AI. Check for mistakes.
""".trimIndent()) as Namespace
val block = tree.subs.first() as ConstantsEnum

val projectOutput = OutputTree(Target.Kotlin)
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The target should be Target.Cpp since this is testing C++ enum generation, not Kotlin.

Suggested change
val projectOutput = OutputTree(Target.Kotlin)
val projectOutput = OutputTree(Target.Cpp)

Copilot uses AI. Check for mistakes.
@vshcryabets vshcryabets requested a review from Copilot October 3, 2025 05:45
@vshcryabets vshcryabets marked this pull request as ready for review October 3, 2025 05:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

DataType.uint64 -> "std::vector<uint64_t>"
DataType.float32 -> "std::vector<float>"
DataType.float64 -> "std::vector<double>"
is DataType.string -> "std::vector<std::string>"
Copy link

Copilot AI Oct 3, 2025

Choose a reason for hiding this comment

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

Pattern matching on DataType.string should not use is keyword since string is likely a companion object property, not a class. Use DataType.string without is.

Suggested change
is DataType.string -> "std::vector<std::string>"
DataType.string -> "std::vector<std::string>"

Copilot uses AI. Check for mistakes.
@vshcryabets vshcryabets requested a review from Copilot October 3, 2025 05:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@vshcryabets vshcryabets requested a review from Copilot October 3, 2025 05:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@vshcryabets vshcryabets merged commit 8329f06 into main Oct 3, 2025
2 checks passed
@vshcryabets vshcryabets deleted the fix/cpp-enums branch October 3, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants