Crash in Xcode 9.3b1 swift compiler: Stored value type does not match pointer operand type!

Originator:steipete
Number:rdar://36843476 Date Originated:25-Jan-2018 12:38 AM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.3b1
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
Stored value type does not match pointer operand type!
  store i8* bitcast (void (i64, i64, %objc_block*, i8*, i8*, i64, %swift.refcounted*)* @_T0SC24PSFileSystemLogLevelMaskVSPys4Int8VGSgSo8NSStringCIeyBa_A2ESuIeyByyyyyy_AbfHSgIeyBa_A2ESuIeyByyyyyy_TRTA to i8*), %objc_block** bitcast (void (i64, i8*, %0* ()*, i8*, i8*, i64)** @PSFileSystemLogHandler to %objc_block**), align 8, !dbg !593
 %objc_block*<unknown>:0: error: fatal error encountered during compilation; please file a bug report with your project and the crash log
<unknown>:0: note: Broken function found, compilation aborted!
0  swift                    0x000000010b74b78a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000010b74ab46 SignalHandler(int) + 966
2  libsystem_platform.dylib 0x00007fff67759f5a _sigtramp + 26
3  libsystem_platform.dylib 0x0000000119a85558 _sigtramp + 2989667864
4  libsystem_c.dylib        0x00007fff67584312 abort + 127
5  swift                    0x0000000107da9307 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)::$_0::__invoke(void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 519
6  swift                    0x000000010b702dc8 llvm::report_fatal_error(llvm::Twine const&, bool) + 280
7  swift                    0x000000010b702ca9 llvm::report_fatal_error(char const*, bool) + 41
8  swift                    0x000000010b6cb406 (anonymous namespace)::VerifierLegacyPass::runOnFunction(llvm::Function&) + 54
9  swift                    0x000000010b672d11 llvm::FPPassManager::runOnFunction(llvm::Function&) + 449
10 swift                    0x000000010b67ac53 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 115
11 swift                    0x000000010b67ab4c llvm::legacy::FunctionPassManager::run(llvm::Function&) + 396
12 swift                    0x0000000107f51da8 swift::performLLVM(swift::IRGenOptions&, swift::DiagnosticEngine*, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, swift::version::Version const&, llvm::StringRef, swift::UnifiedStatsReporter*) + 5096
13 swift                    0x0000000107db419d performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 44685
14 swift                    0x0000000107da7894 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7908
15 swift                    0x0000000107d5c2c5 main + 18917
16 libdyld.dylib            0x00007fff674d8115 start + 1
Stack dump:
0.	Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/AttributionsViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLAction.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/RecentFilesManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/AppDelegate.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantDocumentInfo.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/IntercomHelper.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/Progress+Utils.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/Postman.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Views/ViewCountButtonItem.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Categories/URL+Viewer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentBrowserViewController+Import.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/FirebaseCoordinator.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PDFSearchViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/Data Sources/FullTextSearchDataSource.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenBundleExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/CrashDummy.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/Analytics.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/SettingsViewController+Instant.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/DirectoryBrowserSearchViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/DocumentEditorConfiguration.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/ProFeaturesViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/FileNameResultCell.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/SettingsViewController+Appearance.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/AppleKeychainWrapper/KeychainPasswordItem.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/CellModel+Factory.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenDelegate.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/DirectoryBrowserViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/StartupURL.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/LocalDirectoryBrowserViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/WebServer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/CellHelper.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/FileManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/FeedbackManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Categories/UICollectionView+Offset.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PSPDFDocument+Loading.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/Jailbreak.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/WebsiteImporter.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/StringUtilities.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentBrowserViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLHandlerDocumentBrowserActions.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/WebHelper.swift /Users/steipete/Projects/Viewer-iOS/Viewer/AppDelegate+Development.swift /Users/steipete/Projects/Viewer-iOS/Viewer/main.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Application.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Categories/UIImage+Viewer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/PreviewPDFViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme+Configuration.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Categories/String+Viewer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme+Legacy.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/PDFThumbnailGenerator.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/IntercomAnalyticsClient.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLHandlerTypeInteractive.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/NewPageViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/ViewState.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Environment.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme+UIAppearance.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PDFDocumentCache.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantCodeViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/ThreadSafety.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/FileSystemWrapper.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/RemoteConfiguration.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PSPDFDocument+Utils.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Reporting/MessageBar.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/AnalyticsClientExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/DocumentContentResultCell.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Categories/UIDragItem+PSFileSystem.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLHandlerType.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/DocumentSettingsViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/AdvancedSettingsViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/Siren.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PDFDocumentEditorToolbarController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/Data Sources/SearchDataSource.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/UTIChecker.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/AppearanceModeManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Settings/SettingsViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/DirectoryToolbarController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PDFDocument.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/PDFViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/SecurityScopedDocument.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/UpdateMan.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/ViewStateContainer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantCodeEndpointPicker.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/SnapshotDirectoryContentDataSource.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Zephyr/Zephyr.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/ErrorExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/ExternalPDFDocumentViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Reporting/ActionBar.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/StoreReviewAnalyticsClient.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/OnboardingManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentBrowserViewController+AppearanceMode.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Search/Data Sources/FileNameSearchDataSource.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/HockeyAnalyticsClient.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenUIAlertControllerExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/Optional+Require.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/ScreenDimmer.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/NSUserActivityExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentPresenter.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/AppDelegate+Instant.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/SearchManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentBrowserActionsProvider.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLHandler.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Pro Features/DocumentEditorToolbar.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/TabbedPDFViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Onboarding/InputViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme+UIAppearanceExtensions.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/FileURLHandler.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/CocoaLumberjack/Classes/CocoaLumberjack.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/RootNavigationController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/ConfigurationManager.swift /Users/steipete/Projects/Viewer-iOS/Viewer/FileBrowser/WebDAVAuthenticationProvider.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/XCallbackURL.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantDocumentObserver.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/URLHandler/URLHandlerFileBrowserActions.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenTestHelper.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/Theme+Window.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Helper/AppInfo.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Analytics/FirebaseAnalyticsClient.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Instant/InstantCodeResolver.swift -primary-file /Users/steipete/Projects/Viewer-iOS/Viewer/Reporting/Logging.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Appearance/ThemeCellModel.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Siren/Sources/SirenDateExtension.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document Browser/DocumentBrowserPDFViewController.swift /Users/steipete/Projects/Viewer-iOS/Viewer/Document/ShortcutManager.swift -target x86_64-apple-ios9.0 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk -I /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Products/Debug-iphonesimulator -F /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Products/Debug-iphonesimulator -F /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/HockeySDK.embeddedframework -F /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Firebase/Analytics -F /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Intercom -F /Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Firebase/RemoteConfig -enable-testing -g -module-cache-path /Users/steipete/Builds/ModuleCache -swift-version 4 -enforce-exclusivity=checked -Onone -D DEBUG -D IOS_SIMULATOR -serialize-debugging-options -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Viewer-generated-files.hmap -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Viewer-own-target-headers.hmap -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Viewer-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Viewer-project-headers.hmap -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/steipete/Projects/Viewer-iOS/Viewer/Vendor/Firebase -Xcc -I/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.3.sdk/usr/include/libxml2 -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/DerivedSources/x86_64 -Xcc -I/Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DPSPDF_SWIFTLINT=NO -Xcc -working-directory/Users/steipete/Projects/Viewer-iOS -emit-module-doc-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging~partial.swiftdoc -serialize-diagnostics-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging.dia -import-objc-header /Users/steipete/Projects/Viewer-iOS/Viewer/Viewer-Bridging-Header.h -pch-output-dir /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/PrecompiledHeaders -pch-disable-validation -module-name Viewer -emit-module-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging~partial.swiftmodule -emit-dependencies-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging.d -emit-reference-dependencies-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging.swiftdeps -o /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Build/Intermediates.noindex/Viewer.build/Debug-iphonesimulator/Viewer.build/Objects-normal/x86_64/Logging.o -index-store-path /Users/steipete/Builds/Viewer-bfkysqxtllvridggpcyephecpdwy/Index/DataStore -index-system-modules 
1.	Running pass 'Module Verifier' on function '@_T06Viewer6LoggerC24setUpPSFileSystemLogging33_0DC2C93355D5B9FCE262F286811010B8LLyyF'

Steps to Reproduce:
Assert references this code:

    private func setUpPSFileSystemLogging() {
        #if DEBUG
            PSFileSystemLogLevel.insert(.debug)
        #endif

        // Replace the PSFileSystem logging with a custom one
        PSFileSystemLogHandler = { [unowned self] level, tag, message, file, function, line in
            if !PSFileSystemLogLevel.contains(level) {
                return
            }

            let tagString = tag != nil ? String(cString: tag!) : "PSFileSystem"
            let logMessage = self.formatMessage(forTag: tagString, function: String(cString: function), line: line, message: message)

            switch level {
            case let value where value == .verbose:
                DDLogVerbose(logMessage)
            case let value where value == .debug:
                DDLogDebug(logMessage)
            case let value where value == .info:
                DDLogInfo(logMessage)
            case let value where value == .warning:
                DDLogWarn(logMessage)
            case let value where value == .error:
                DDLogError(logMessage)
            default:
                DDLogInfo(logMessage)
            }
        }
    }


this is the declaration of the handler:

typedef void (^PSFLogHandlerBlock)(PSFileSystemLogLevelMask level, const char *_Nullable tag, NSString *(^message)(void), const char *file, const char *function, NSUInteger line);

/// Default handler for logging.
PSFILESYSTEM_EXPORT PSFLogHandlerBlock PSFileSystemLogHandler;
PSFILESYSTEM_EXPORT PSFileSystemLogLevelMask PSFileSystemLogLevel;


typedef NS_OPTIONS(NSUInteger, PSFileSystemLogLevelMask) {
    /// Logs critical issues. Should never be disabled.
    PSFileSystemLogLevelMaskError   = 1 << 0,

    /// Logs issues that are not critical but log-worthy.
    PSFileSystemLogLevelMaskWarning = 1 << 1,

    /// Logs important operations.
    PSFileSystemLogLevelMaskInfo    = 1 << 2,

    /// Will log almost everything and slow down the application flow.
    PSFileSystemLogLevelMaskDebug   = 1 << 3,

    /// Might log security related details like signature points.
    /// Never enable this in release builds unless they are solely for testing.
    PSFileSystemLogLevelMaskVerbose = 1 << 4

} PSFILESYSTEM_ENUM_AVAILABLE;

    private func formatMessage(forTag tag: String, function: String, line: UInt, message: () -> String) -> String {
        return "[\(tag)] \(function)/\(line): \(message())"
    }

Expected Results:
this compiled fine in Xcode 9.2.1

Actual Results:
assert

Version:
Xcode 9.3b1

Notes:
Is there any way to provide a sample for the crash much like clang crahers build an .sh file with the source code? I copied int he relevant bits. can provide a runnable sample if needed.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!