swiftlang/swift

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

Open

#52,691 opened on Apr 3, 2019

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Swift (10,719 forks)batch import
bugcompilerdiagnostics qualitygood first issue

Repository metrics

Stars
 (69,989 stars)
PR merge metrics
 (Avg merge 8d 17h) (510 merged PRs in 30d)

Description

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.

Contributor guide