From 505fe023b7c161e08acd9f919319d101e4959f78 Mon Sep 17 00:00:00 2001 From: Ruslan Remenkov Date: Fri, 25 Feb 2022 12:17:03 +0300 Subject: [PATCH] Fix Color.init(_:bundle:) signature when assetsInSwiftPackage equals TRUE (#153) --- Sources/XcodeExport/Resources/Color+extension.swift.stencil | 2 +- Tests/XcodeExportTests/XcodeColorExporterTests.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/XcodeExport/Resources/Color+extension.swift.stencil b/Sources/XcodeExport/Resources/Color+extension.swift.stencil index 977e573b..1daa4c88 100644 --- a/Sources/XcodeExport/Resources/Color+extension.swift.stencil +++ b/Sources/XcodeExport/Resources/Color+extension.swift.stencil @@ -11,5 +11,5 @@ private class BundleProvider { {% endif %} public extension Color {{ "{" }}{% for color in colors %} - static var {{ color.name }}: Color { Color({% if useNamespace %}"{{ color.originalName }}"{% else %}#function{% endif %}{% if not assetsInMainBundle %}, in: BundleProvider.bundle{% endif %}) }{% endfor %} + static var {{ color.name }}: Color { Color({% if useNamespace %}"{{ color.originalName }}"{% else %}#function{% endif %}{% if not assetsInMainBundle %}, bundle: BundleProvider.bundle{% endif %}) }{% endfor %} } diff --git a/Tests/XcodeExportTests/XcodeColorExporterTests.swift b/Tests/XcodeExportTests/XcodeColorExporterTests.swift index 2fffe512..967fd2e7 100644 --- a/Tests/XcodeExportTests/XcodeColorExporterTests.swift +++ b/Tests/XcodeExportTests/XcodeColorExporterTests.swift @@ -259,8 +259,8 @@ final class XcodeColorExporterTests: XCTestCase { } public extension Color { - static var colorPair1: Color { Color(#function, in: BundleProvider.bundle) } - static var colorPair2: Color { Color(#function, in: BundleProvider.bundle) } + static var colorPair1: Color { Color(#function, bundle: BundleProvider.bundle) } + static var colorPair2: Color { Color(#function, bundle: BundleProvider.bundle) } } """)