In this case, Swift is being, lets say suboptimal, compiling an 8MB array of integers.
It's worth mentioning another, more common, cause. There can be computational cost explosion when Swift resolves the types for function calls (and operators). You notice it when you get the "too complex" error, but you may be tolerating slow compiles which are just slightly less than too complex. A few explicit type annotations in these situations can do wonders for speeding your development cycle.
Edit: redact I unfortunately can't tell you how to find these. Maybe a "give it a go with reduced complexity limit" compiler flag would help find them.
Edit: Add see reply below for answer.