[swift-dev] Compiling SIL with swiftc

Luke Howard lukeh at padl.com
Thu Dec 31 04:33:39 CST 2015


Newbie question, is the following supposed to work?

$ ./swiftc -emit-sil -o lookup.sil lookup.swift
$ ./swiftc -parse-sil -o lookup lookup.sil

It fails with a gazillion errors:

lookup.sil:61:25: error: use of undeclared type 'SomeProtocol'
  %23 = metatype $@thin SomeProtocol.Protocol
                        ^~~~~~~~~~~~
lookup.sil:62:3: error: expressions are not allowed at the top level
  %24 = metatype $@thick SomeProtocol.Protocol    // user: %25
  ^
lookup.sil:62:17: error: consecutive statements on a line must be separated by ';'
  %24 = metatype $@thick SomeProtocol.Protocol    // user: %25
                ^
                ;
...

almost as if it thinks it’s Swift.

— Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20151231/09eaea92/attachment.html>


More information about the swift-dev mailing list