[Swift-user] import position in swift script
Max Hutchinson
maxhutch at gmail.com
Thu Jun 18 12:20:02 CDT 2015
Do all import statements need to come before executable statements?
I have two scripts: defs.swift and run.swift. If run.swift starts with
import "defs";
then everything works fine. If instead defs.swift ends with
import "run";
I get this error:
Swift trunk git-rev: 1d512cbda070d363e8ec3cf16e77dfcddc6e66cb heads/master
6377
RunID: run011
Could not compile SwiftScript source: line 24:12: unexpected token: ;
where line 24 is:
int foo = 1;
Thanks,
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20150618/b40ac57a/attachment.html>
More information about the Swift-user
mailing list