<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Newbie question, is the following supposed to work?</div><div class=""><br class=""></div><div class="">$ ./swiftc -emit-sil -o lookup.sil&nbsp;lookup.swift<br class="">$ ./swiftc -parse-sil -o lookup&nbsp;lookup.sil<br class=""><br class=""></div><div class="">It fails with a gazillion errors:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class=""><b class="">lookup.sil:61:25: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">use of undeclared type 'SomeProtocol'</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class="">&nbsp; %23 = metatype $@thin SomeProtocol.Protocol</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^~~~~~~~~~~~</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class=""><b class="">lookup.sil:62:3: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">expressions are not allowed at the top level</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class="">&nbsp; %24 = metatype $@thick SomeProtocol.Protocol&nbsp; &nbsp; // user: %25</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><b class="">&nbsp; ^</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class=""><b class="">lookup.sil:62:17: </b><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">error: </b></span><b class="">consecutive statements on a line must be separated by ';'</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class="">&nbsp; %24 = metatype $@thick SomeProtocol.Protocol&nbsp; &nbsp; // user: %25</div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</b></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;</div></div><div style="margin: 0px; font-size: 12px; line-height: normal; font-family: Consolas; color: rgb(141, 166, 249); background-color: rgb(0, 0, 0);" class="">...</div><div class=""><br class=""></div><div class="">almost as if it thinks it’s Swift.</div><div class=""><br class=""></div><div class="">— Luke<br class=""></div></body></html>