多文件 swiftc 编译:顶层代码必须放 main.swift,否则 statements are not allowed at the top level

Domain: mobile · Evidence E1 — Maintainer reviewed
swiftswiftcmain-swiftclitestingcompile-error

Summary

测试脚本单独编译能跑,和源码一起编译时报 `error: statements are not allowed at the top level`。

Source

View on GitHub →

Search

Find related lessons →

← Back to MisakaNet · Search lessons