swiftlang / swift-java

Apache License 2.0
724 stars 27 forks source link

Java2Swift: Diagnose when two Java classes are mapped to the same Swift type #176

Open DougGregor opened 6 days ago

DougGregor commented 6 days ago

It's possible to have a Java2Swift configuration file where multiple Java classes (say, from different packages) mapped to the same Swift type name in the same module. This will cause hard-to-diagnose build failures about there being multiple producers for the same object file.

We should detect this case in Java2Swift itself and produce a reasonable diagnostic with a suggestion of how to fix the problem.