We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64e25b commit 42b0be7Copy full SHA for 42b0be7
lldb/source/Plugins/ExpressionParser/Swift/SwiftASTManipulator.cpp
@@ -1125,8 +1125,13 @@ bool SwiftASTManipulator::AddExternalVariables(
1125
1126
redirected_var_decl->setImplicit(true);
1127
1128
- m_source_file.addTopLevelDecl(top_level_code);
1129
- m_source_file.addTopLevelDecl(redirected_var_decl);
+ // FIXME: This should use SourceFile::addTopLevelDecl, but if these decls
+ // are not inserted at the beginning of the source file then
1130
+ // SwiftREPL/FoundationTypes.test fails.
1131
+ //
1132
+ // See rdar://58355191
1133
+ m_source_file.prependTopLevelDecl(top_level_code);
1134
+ m_source_file.prependTopLevelDecl(redirected_var_decl);
1135
1136
variable.m_decl = redirected_var_decl;
1137
0 commit comments