Skip to content

Conversation

@diederich
Copy link
Contributor

in case of duplicated properties, e.g. from a base class it was generating duplicate property definitions, e.g.:

extension JavaClass<PrivateKey> {
  @JavaStaticField(isFinal: true)
  public var serialVersionUID: Int64

  @JavaStaticField(isFinal: true)
  public var serialVersionUID: Int64
}

(see e.g. https://docs.oracle.com/javase/8/docs/api/java/security/PrivateKey.html)

which then fails the swift build.

Analog to methods, this now skips the property in case it wasn't directly from the class itself.

in case of duplicated properties, e.g. from a base class it was
generating duplicate property definitions, e.g.:

```
extension JavaClass<PrivateKey> {
  @JavaStaticField(isFinal: true)
  public var serialVersionUID: Int64

  @JavaStaticField(isFinal: true)
  public var serialVersionUID: Int64
}

```
(see e.g. https://docs.oracle.com/javase/8/docs/api/java/security/PrivateKey.html)

which then fails the swift build.

Analog to methods, this now skips the property in case it wasn't directly from
the class itself.
Copy link
Collaborator

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you!

@ktoso
Copy link
Collaborator

ktoso commented Jan 5, 2026

Tested locally while we debug the macOS CI problem -- lgtm, thank you!

@ktoso ktoso merged commit da6be2f into swiftlang:main Jan 5, 2026
93 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants