<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">
<div>
<div>I see that <a href="https://bugs.swift.org/browse/SR-3774">SR-3774</a> already exists, but that ticket was about declarations not appearing in the emitted SIL.</div>
<div><br /></div>
<div>I'm able to get declarations to appear with the -frontend flag, but the emitted SIL <i>still</i> doesn't parse on master:<br /></div>
</div>
<div><br /></div>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div>
<div>$ &#160;echo 'print("moof")' &gt; test.swift</div>
</div>
<div>
<div>$ &#160;swiftc -frontend -emit-sil test.swift &gt; test.sil</div>
</div>
<div>
<div>$ &#160;swiftc -parse-sil test.sil</div>
</div>
<div><br /></div>
<div>Assertion failed: ((Qualifier != StoreOwnershipQualifier::Unqualified) || F.hasUnqualifiedOwnership() &amp;&amp; "Unqualified inst in qualified function"), function createStore, file /swift-dev/swift/include/swift/SIL/SILBuilder.h, line 503.</div>
<div>0 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011298d4d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&amp;) + 40</div>
<div>1 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011298db86 SignalHandler(int) + 454</div>
<div>2 &#160;libsystem_platform.dylib 0x00007fffa48ceb3a _sigtramp + 26</div>
<div>3 &#160;libsystem_platform.dylib 000000000000000000 _sigtramp + 1534268640</div>
<div>4 &#160;libsystem_c.dylib &#160; &#160; &#160; &#160;0x00007fffa4753420 abort + 129</div>
<div>5 &#160;libsystem_c.dylib &#160; &#160; &#160; &#160;0x00007fffa471a893 basename_r + 0</div>
<div>6 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011017b2fc swift::SILBuilder::createStore(swift::SILLocation, swift::SILValue, swift::SILValue, swift::StoreOwnershipQualifier) + 396</div>
<div>7 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011038ddec (anonymous namespace)::SILParser::parseSILInstruction(swift::SILBasicBlock*, swift::SILBuilder&amp;) + 70412</div>
<div>8 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x0000000110373217 swift::Parser::parseDeclSIL() + 5111</div>
<div>9 &#160;swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011033112d swift::Parser::parseTopLevel() + 269</div>
<div>10 swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x0000000110367edb swift::parseIntoSourceFile(swift::SourceFile&amp;, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) + 283</div>
<div>11 swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000011011da0c swift::CompilerInstance::performSema() + 3580</div>
<div>12 swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000010f676f6d swift::performFrontend(llvm::ArrayRef&lt;char const*&gt;, char const*, void*, swift::FrontendObserver*) + 4621</div>
<div>13 swift &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;0x000000010f6338f0 main + 3312</div>
<div>14 libdyld.dylib &#160; &#160; &#160; &#160; &#160; &#160;0x00007fffa46bf235 start + 1</div>
</blockquote>
<br />
<div>Is this a bug? Am I using the wrong combination of flags?</div>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Ben Ng
<div><a href="https://benng.me/">https://benng.me</a><br /></div>
</div>
</body>
</html>