<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="">Hi,<div class=""><br class=""></div><div class="">This error makes perfect sense, but I’m surprised it's a runtime error. I expected it at compile time. Am I doing something wrong? Is this on the type system to-do list?</div><div class=""><br class=""></div><div class=""><font face="Courier" class=""> let c = JSONEncoder()</font></div><div class=""><font face="Courier" class=""> struct Foo { … }</font></div><div class=""><font face="Courier" class=""> let fs: [Foo] = [ Foo(...) ]<br class=""> let data = try! c.encode(fs) // Didn’t think this would compile</font></div><div class=""><br class=""></div><div class="">The runtime error is: fatal error: Array<Foo> does not conform to Encodable because Foo does not conform to Encodable.</div><div class=""><br class=""></div><div class="">Rob</div></body></html>