swiftlang/swift

[SR-10291] Some of the error messages might require trimming

開放

#52,691 建立於 2019年4月3日

 (6 則留言) (0 個反應) (0 位負責人)Swift (10,719 個分叉)batch import
bugcompilerdiagnostics qualitygood first issue

倉庫指標

星標
 (69,989 顆星)
PR 合併指標
 (平均合併 8天 17小時) (30 天內合併 510 個 PR)

描述

Previous ID SR-10291
Radar rdar://problem/49393677
Original Reporter @xedin
Type Bug
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee None
Priority Medium

md5: 59ddf07a63039e0c74cd437ae791689d

Issue Description:

Consider following example:

func foo(_: UnsafePointer<Int8>?) {}
foo((1, 2, 3))

This results in:

cannot convert value of type '(Int, Int, Int)' to expected argument type 'UnsafePointer<Int8>?'

So the more elements to the tuple we add, the bigger the message is going to get.

I think it makes sense to trim contents of the tuple which has same types to something like `(Int8, ..., Int8)` to make sure that it doesn't grow too long.

貢獻者指南