<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 31, 2015, at 2:33 AM, Luke Howard via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div 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 lookup.swift<br class="">$ ./swiftc -parse-sil -o lookup 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=""> %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=""> ^~~~~~~~~~~~</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=""> %24 = metatype $@thick SomeProtocol.Protocol // 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=""> ^</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=""> %24 = metatype $@thick SomeProtocol.Protocol // 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=""> ^</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=""> ;</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></div></blockquote><br class=""></div><div>This should work. I think, though, that if you try to compile multiple files together, it currently parses them all as .swift files, which might explain the failure.</div><div><br class=""></div><div>-Joe</div><br class=""></body></html>