Open
Description
Previous ID | SR-3860 |
Radar | rdar://problem/30393457 |
Original Reporter | @krzyzanowskim |
Type | Bug |
Attachment: Download
Environment
Swift 3.0.2
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, 3.0Regression, TypeChecker |
Assignee | None |
Priority | Medium |
md5: dc1a3e25eed7f5c5f470127841c056e3
Issue Description:
Given sample does not compile. It does compile for the "+" operation, though.
let arr:[UInt32] = [1,2,3]
_ = UInt32(1 - arr[Int(1)]) // error: ambiguous use of operator '-'
_ = UInt32(1 - arr[1]) // ok
Untitled 12.swift:4:14: error: ambiguous use of operator '-'
_ = UInt32(1 - arr[Int(1)]) // error: ambiguous use of operator '-'
^
Swift.-:1:13: note: found this candidate
public func -<T : Strideable>(lhs: T, rhs: T) -> T.Stride
^
Swift.-:1:13: note: found this candidate
public func -<T : _DisallowMixedSignArithmetic>(lhs: T, rhs: T) -> T._DisallowMixedSignArithmetic
^