<div dir="ltr">Could that constraint be relaxed?<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 18, 2015 at 12:47 PM Mihael Hategan <<a href="mailto:hategan@mcs.anl.gov">hategan@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Yes. Imports must come before other types of statements.<br>
<br>
Mihael<br>
<br>
On Thu, 2015-06-18 at 17:20 +0000, Max Hutchinson wrote:<br>
> Do all import statements need to come before executable statements?<br>
><br>
> I have two scripts: defs.swift and run.swift. If run.swift starts with<br>
> import "defs";<br>
> then everything works fine. If instead defs.swift ends with<br>
> import "run";<br>
> I get this error:<br>
> Swift trunk git-rev: 1d512cbda070d363e8ec3cf16e77dfcddc6e66cb heads/master<br>
> 6377<br>
> RunID: run011<br>
> Could not compile SwiftScript source: line 24:12: unexpected token: ;<br>
> where line 24 is:<br>
> int foo = 1;<br>
><br>
> Thanks,<br>
> Max<br>
> _______________________________________________<br>
> Swift-user mailing list<br>
> <a href="mailto:Swift-user@ci.uchicago.edu" target="_blank">Swift-user@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" rel="noreferrer" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br>
<br>
<br>
</blockquote></div>