<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br><br></div>I am learning SIL and trying to compile SIL generated by the Swift compiler.<br></div>I succeeded in doing so with a simple Swift program for just printing &quot;hi&quot;,<br></div>but I got errors with another simple program which includes a declaration of a trivial class.<br></div><br></div>I am running swift-3.0-preview-1 bundled with Xcode8-beta on OS X El Capitan.<br><br>$ uname -a<br>Darwin localhost 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64<br>$ swiftc --version<br>Apple Swift version 3.0 (swiftlang-800.0.30 clang-800.0.24)<br>Target: x86_64-apple-macosx10.9<br>$ cat print.swift<br>print(&quot;hi&quot;)<br>$ swiftc -emit-silgen print.swift &gt; print.sil<br>$ swiftc -parse-sil print.sil<br>$ ./print<br>hi<br>$ cat classdecl.swift<br>class MyObject { }<br>$ swiftc -emit-silgen classdecl.swift &gt; classdecl.sil<br>$ swiftc -parse-sil classdecl.sil<br>classdecl.sil:26:105: error: use of undeclared type &#39;MyObject&#39;<br>sil_scope 2 { loc &quot;classdecl.swift&quot;:1:7 parent @_TFC9classdecl8MyObjectD : $@convention(method) (@owned MyObject) -&gt; () }<br>                                                                                                        ^~~~~~~~<br>classdecl.sil:26:121: error: extraneous &#39;}&#39; at top level<br>sil_scope 2 { loc &quot;classdecl.swift&quot;:1:7 parent @_TFC9classdecl8MyObjectD : $@convention(method) (@owned MyObject) -&gt; () }<br>                                                                                                                        ^<br><br></div>(omitted)<br><br>If anybody know any clue, please let me know.<br></div><br>Thanks,<br>Mikio Takeuchi<br></div></div>