Skip to content

Conversation

@jketema
Copy link
Contributor

@jketema jketema commented May 26, 2025

No description provided.

Copilot AI review requested due to automatic review settings May 26, 2025 14:23
@jketema jketema requested a review from a team as a code owner May 26, 2025 14:23
@github-actions github-actions bot added the Swift label May 26, 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

Fixes the string representation of Swift TypeValueExpr by guarding the call to fetchLabel and passing both the syntax and resolved type when available.

  • Added checks for getParamTypeRepr() and getParamType()
  • Updated fetchLabel to accept both the TypeRepr and the Type
  • Removed the unconditional single-argument call
Comments suppressed due to low confidence (1)

swift/extractor/translators/ExprTranslator.cpp:694

  • Add unit tests covering scenarios where getParamTypeRepr() or getParamType() is null to ensure the new conditional logic behaves as expected and avoids regressions.
if (expr.getParamTypeRepr() && expr.getParamType()) {

Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Thanks!

@jketema jketema merged commit 0f2d2b7 into github:main May 27, 2025
15 checks passed
@jketema jketema deleted the jketema/swift-type branch May 27, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants