warrenm / GLTFKit2

A glTF 2.0 asset loader and exporter for Objective-C and Swift.
MIT License
150 stars 26 forks source link

Swift compiler error due to compactMap return type inference on Xcode 13.3 #36

Closed CoderBt closed 9 months ago

CoderBt commented 9 months ago
 func convert(mesh gltfMesh: GLTFMesh, context: GLTFRealityKitResourceContext) throws -> RealityKit.ModelComponent? {
        let meshDescriptorAndMaterials = try gltfMesh.primitives.compactMap {
            if let meshDescriptor = try self.convert(primitive: $0, context:context) {
                let material = try self.convert(material: $0.material, context: context)
                return (meshDescriptor, material)
            }
            // If we fail to create a mesh descriptor for a primitive, omit it from the list.
            return nil
        }

Generic parameter 'ElementOfResult' could not be inferred

warrenm commented 9 months ago

Please provide additional information about your configuration such as your macOS version, Xcode version, and target platform and version.

CoderBt commented 9 months ago

image xcode 13.3.1 ios 15.0+

warrenm commented 9 months ago

This should be addressed with e3b2009. Thanks for the report.

warrenm commented 9 months ago

This issue will be automatically closed in seven days if no further response is received.

warrenm commented 9 months ago

Closing due to inactivity.