Type inference regression in Swift 4.2?

Currently, it seems impossible to compile SwiftParsec with Swift 4.2, because the compiler will emit the following error:

The problem appears to be this expression.

However, this library compiles without problems in Swift 4.1.2.

Did anything substantial change about the type inference algorithm or what could be a likely explanation for this change in compiler behaviour?

Hi Fryie -- do you mind reporting this as a bug on bugs.swift.org? I think you can basically just copy this post into the description field.

done: [SR-8804] Type inference regression in Swift 4.2 · Issue #51312 · apple/swift · GitHub

1 Like