Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CoderBt opened this issue Sep 25, 2023 · 5 comments
Closed

Comments

@CoderBt
Copy link

CoderBt commented Sep 25, 2023

 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
Copy link
Owner

warrenm commented Sep 25, 2023

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

@CoderBt
Copy link
Author

CoderBt commented Sep 25, 2023

image
xcode 13.3.1 ios 15.0+

@warrenm warrenm changed the title not work Swift compiler error due to compactMap return type inference on Xcode 13.3 Sep 25, 2023
@warrenm
Copy link
Owner

warrenm commented Sep 25, 2023

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

@warrenm
Copy link
Owner

warrenm commented Sep 26, 2023

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

@warrenm
Copy link
Owner

warrenm commented Oct 3, 2023

Closing due to inactivity.

@warrenm warrenm closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants