swiftlang/swift
Vedi su GitHub[SR-10291] Some of the error messages might require trimming
Open
#52.691 aperta il 3 apr 2019
bugcompilerdiagnostics qualitygood first issue
Metriche repository
- Star
- (69.989 star)
- Metriche merge PR
- (Merge medio 8g 17h) (510 PR mergiate in 30 g)
Descrizione
| 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.