Skip to content

Commit 57f96b0

Browse files
committed
Fix linker error for makeRBSString
The declaration of makeRBSString was added to rbs_common.h (in sorbet#9770) but the only definition remained inside an anonymous namespace in SignatureTranslator.cc, making it invisible to other translation units. Move the definition out of the anonymous namespace and update the parameter type from `const string &` to `const string_view` to match the header declaration, so that SignatureTranslatorPrism.cc (and any future callers) can link against it.
1 parent 8e3953d commit 57f96b0

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

rbs/SignatureTranslator.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ using namespace std;
99

1010
namespace sorbet::rbs {
1111

12-
namespace {
13-
14-
rbs_string_t makeRBSString(const string &str) {
12+
rbs_string_t makeRBSString(const string_view str) {
1513
return rbs_string_new(str.data(), str.data() + str.size());
1614
}
1715

18-
} // namespace
19-
2016
unique_ptr<parser::Node>
2117
SignatureTranslator::translateAssertionType(vector<pair<core::LocOffsets, core::NameRef>> typeParams,
2218
const rbs::RBSDeclaration &assertion) {

0 commit comments

Comments
 (0)