The code example in the OP is still too complex to type check, even for Xcode 10.2.1:
import simd
func test(_ p0: float2, _ p1: float2, _ p2: float2, _ p3: float2) {
let i = 3*(-p0 + 3*p1) - (3*p2 + p3)
let j = 6*(p0 - 2*p1 + p2)
let k = 3*(p1 - p0)
print(i, j, k)
}
swiftc --version
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.5.0
$ time swiftc test.swift
test.swift:4:28: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
let i = 3*(-p0 + 3*p1) - (3*p2 + p3)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
real 0m20.778s
user 0m18.693s
sys 0m1.627s
:ยด /
(As previously noted, this is: SR-10461.)