Skip to content

Commit

Permalink
Fix cannot infer return type for closure
Browse files Browse the repository at this point in the history
This commit will add the type to the dateFormatter property declaration
in the OnlineSubtitle class.

This corrects a "cannot infer return type for closure with multiple
statements" compilation error under older versions of Xcode. Normally
IINA only supports the latest version of Xcode, however at the moment
we are trying to maintain compatibility with Xcode 14 to support
building for older versions of macOS that are not supported by
Xcode 15.
  • Loading branch information
low-batt committed Dec 19, 2023
1 parent 79cd70c commit 669db3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iina/OpenSubSubtitle.swift
Expand Up @@ -16,7 +16,7 @@ import PromiseKit
class OpenSub {
final class Subtitle: OnlineSubtitle {

private static let dateFormatter = {
private static let dateFormatter: DateFormatter = {
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
dateFormatter.timeStyle = .medium
Expand Down

0 comments on commit 669db3d

Please sign in to comment.