[interop] C++ extension for class template specialization isn't visible when forward declaration for it is present #62165
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
c++ interop
Feature: Interoperability with C++
compiler
The Swift compiler itself
Swift fails to compile a file as it can't find a method in an extension for a C++ class template, when this template specialization typealias is in module B, and module A defines it and has a forward declaration for this template.
Steps to reproduce:
$ cat test.h
$ cat test3.h
$ cat module.modulemap
$ cat test.swift
$ cat test2.swift
invoke:
$ bin/swiftc -sdk $SDK -emit-module -module-name TestExt test.swift -I . -Xfrontend -enable-experimental-cxx-interop
$ bin/swiftc -sdk $SDK -emit-module -module-name TestProd test2.swift -I . -Xfrontend -enable-experimental-cxx-interop
RESULT:
Expected result:
Should compile.
If I remove the forward declaration from test.h, it works.
The text was updated successfully, but these errors were encountered: