Avatar
Avatar
masakihori
@swift-main let v: Int? = -1 if case Optional<PartialRangeUpTo<Int>>.some(..<0) = v { print("OK") }
swiftNightly BOT 1/30/2025 3:18 AM
exit status: 1 with <stdin>:3:41: error: pattern of type 'Optional<PartialRangeUpTo<Int>>' cannot match 'Int?' 1 | let v: Int? = -1 2 | 3 | if case Optional<PartialRangeUpTo<Int>>.some(..<0) = v { print("OK") } | `- error: pattern of type 'Optional<PartialRangeUpTo<Int>>' cannot match 'Int?' 4 | <stdin>:3:41: error: pattern of type 'Optional<Int>' cannot match 'Optional<PartialRangeUpTo<Int>>' 1 | let v: Int? = -1 2 | 3 | if case Optional<PartialRangeUpTo<Int>>.some(..<0) = v { print("OK") } | `- error: pattern of type 'Optional<Int>' cannot match 'Optional<PartialRangeUpTo<Int>>' 4 |