devxoul / Then

✨ Super sweet syntactic sugar for Swift initializers
MIT License
4.19k stars 291 forks source link

Xcode 14 code prompt error #96

Closed whisterlee closed 6 months ago

whisterlee commented 1 year ago

Use Then with Xcode14, and the code prompts that there is something wrong. WechatIMG226

yisRookie commented 1 year ago

I have the same problem~

yisRookie commented 1 year ago

截屏2022-10-26 17 26 43

yisRookie commented 1 year ago

Like the issue #71

loinsir commented 1 year ago

I have same issue

JJIKKYU commented 1 year ago

저도 같은 이슈가 있습니다. xcode14 이후로 첫 라인을 제외한 두번째 라인부터 $0에 대한 타입 추론을 하지 못하는 것 같습니다.

loinsir commented 1 year ago

@JJIKKYU 저는 해결된것 같습니다. 혹시 확인 가능하신가요?

WhiteHyun commented 1 year ago

Specifying the type of a variable can resolve this issue. For example:

Type Annotation Type Inferred
image image

Specifying the type of the parameter inside the closure is also possible.

Closure type annotation
image
loinsir commented 1 year ago

Then 내부 코드의 @inlinable 애트리뷰트의 컴파일러 내부 동작에 뭔가 변화가 있어서 이런일이 발생한것 같은데요, 실제로 @inlinable 대신 @inline(__always) 등으로 교체해서 적용해보니 동작했던것 같습니다. 혹시 확인 가능하신가요? @WhiteHyun

WhiteHyun commented 1 year ago

음 저는 안되는 것 같네요. 😭 @loinsir

make1a commented 1 year ago

I have the same issue image

pengzishangTest commented 10 months ago

Keep editing in the first line when XCode. The completion will load fine.

whisterlee commented 6 months ago

The issue has been resolved in Xcode 15.