Getting source code error in Learn to Code 3 in Swift Playground App

I am getting this error while tapping the Run My Code in the right. It’s heading is “Error Compiling Source”


Error: Contents/Sources/CGPathExtensions.swift:58: converting non-escaping value to 'T' may allow it to escape

Error: Contents/Sources/CGPathExtensions.swift:58: converting non-escaping value to 'T' may allow it to escape


How do I fix this error? I don’t want to delete the Playgrounds app because I fear that I’ll lose all my files..

Replies

Have a line of code that looks anything like this?



func forEach( body: @escaping @convention(block) (CGPathElement) -> Void)