skiptools / skip-ui

SwiftUI for Android
https://skip.tools
GNU Lesser General Public License v3.0
129 stars 14 forks source link

.onChange with brackets form results in compilation error #31

Closed hepspl closed 6 months ago

hepspl commented 6 months ago

.onChange() is marked as fully supported however I noticed that at least one form of onChange results in compilation error:

.onChange(of: someVar, { oldValue, newValue in ... }) Will result in

Cannot infer a type for this parameter. Please specify it explicitly.

Transforming it into: .onChange(of: someVar) { oldValue, newValue in ... } Fixes the problem.

Please consider checking while other form does not work and produce kind of misleading error message.

aabewhite commented 6 months ago

Thanks! We'll look into this!

aabewhite commented 6 months ago

This should be fixed now in SkipUI 0.9.2. Use Xcode's File->Packages->Update to Latest to get the fixed version. Please let us know if you have any issues, and thanks again for the report.

hepspl commented 6 months ago

Thank you for your quick support!