From 1b6d7fd7cbefd1888adfb139fc11fe6aea0c8120 Mon Sep 17 00:00:00 2001 From: Aleksei Sapitskii <45671572+aleksproger@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:20:47 +0300 Subject: [PATCH] Resolve type inference ambiguity in examples (#2184) --- .../All Examples/Annotations/DynamicViewAnnotationExample.swift | 2 +- .../Annotations/PointAnnotationClusteringExample.swift | 2 +- .../All Examples/Annotations/SymbolClusteringExample.swift | 2 +- .../Examples/All Examples/PitchAndDistanceExample.swift | 2 +- .../Examples/Examples/SwiftUI Examples/AnnotationsExample.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Apps/Examples/Examples/All Examples/Annotations/DynamicViewAnnotationExample.swift b/Apps/Examples/Examples/All Examples/Annotations/DynamicViewAnnotationExample.swift index fb22c83759f6..5bc4a46c0a6e 100644 --- a/Apps/Examples/Examples/All Examples/Annotations/DynamicViewAnnotationExample.swift +++ b/Apps/Examples/Examples/All Examples/Annotations/DynamicViewAnnotationExample.swift @@ -226,7 +226,7 @@ private final class Route { guard !displayed, let mapView else { return } displayed = true - func colorExpression(normal: String, selected: String) -> Expression { + func colorExpression(normal: String, selected: String) -> MapboxMaps.Expression { Exp(.switchCase) { Exp(.boolean) { Exp(.featureState) { "selected" } diff --git a/Apps/Examples/Examples/All Examples/Annotations/PointAnnotationClusteringExample.swift b/Apps/Examples/Examples/All Examples/Annotations/PointAnnotationClusteringExample.swift index 67360f17bc91..eb3c9c5b511f 100644 --- a/Apps/Examples/Examples/All Examples/Annotations/PointAnnotationClusteringExample.swift +++ b/Apps/Examples/Examples/All Examples/Annotations/PointAnnotationClusteringExample.swift @@ -103,7 +103,7 @@ final class PointAnnotationClusteringExample: UIViewController, ExampleProtocol } // Create a cluster property to add to each cluster - let clusterProperties: [String: Expression] = [ + let clusterProperties: [String: MapboxMaps.Expression] = [ "sum": sumExpression ] diff --git a/Apps/Examples/Examples/All Examples/Annotations/SymbolClusteringExample.swift b/Apps/Examples/Examples/All Examples/Annotations/SymbolClusteringExample.swift index df162a08a589..bde79c6a3b87 100644 --- a/Apps/Examples/Examples/All Examples/Annotations/SymbolClusteringExample.swift +++ b/Apps/Examples/Examples/All Examples/Annotations/SymbolClusteringExample.swift @@ -77,7 +77,7 @@ final class SymbolClusteringExample: UIViewController, ExampleProtocol { } // Add the expressions to the cluster as ClusterProperties so they can be accessed below - let clusterProperties: [String: Expression] = [ + let clusterProperties: [String: MapboxMaps.Expression] = [ "max": maxExpression, "in_e9": ine9Expression, "sum": sumExpression diff --git a/Apps/Examples/Examples/All Examples/PitchAndDistanceExample.swift b/Apps/Examples/Examples/All Examples/PitchAndDistanceExample.swift index a9a1f17a4327..4bc09ee91bd7 100644 --- a/Apps/Examples/Examples/All Examples/PitchAndDistanceExample.swift +++ b/Apps/Examples/Examples/All Examples/PitchAndDistanceExample.swift @@ -36,7 +36,7 @@ final class PitchAndDistanceExample: UIViewController, ExampleProtocol { // Add an additional condition to the current filter // to filter based on ["pitch"] and ["distance-from-center"] - func updateFilter(currentFilter: Expression) -> Expression { + func updateFilter(currentFilter: MapboxMaps.Expression) -> MapboxMaps.Expression { let updatedFilter = Exp(.all) { currentFilter Exp(.switchCase) { diff --git a/Apps/Examples/Examples/SwiftUI Examples/AnnotationsExample.swift b/Apps/Examples/Examples/SwiftUI Examples/AnnotationsExample.swift index 416bb74d72e7..65dd0f2b3de9 100644 --- a/Apps/Examples/Examples/SwiftUI Examples/AnnotationsExample.swift +++ b/Apps/Examples/Examples/SwiftUI Examples/AnnotationsExample.swift @@ -144,7 +144,7 @@ struct AnnotationsExample: View { } // Create a cluster property to add to each cluster - let clusterProperties: [String: Expression] = [ + let clusterProperties: [String: MapboxMaps.Expression] = [ "sum": sumExpression ]