dotnet / dotnet/fsharp

Confusing use of single quote char in error messages

Open
#15,222 0 comments 1 reaction 0 assignees View on GitHub
Area-Diagnostics Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

Error messages involving the `'` single quote character can be hard to read.

**Repro steps**

1. Evoke a compiler error in which quoted material is intermixed with `'` used for types `'a` and values `x'`.

**Expected behavior**

Appropriate use of characters: `‘` for open quote, `’` for close quote, and `'` for program text
`Type mismatch. Expecting a     ‘(string * string) array -> 'a’ but given a     ‘(string * string) array -> seq’ The type ‘int list -> 'a’ does not match the type ‘string’`

**Actual behavior**

The ASCII single quote character `'` is used in all three situations.
`Type mismatch. Expecting a     '(string * string) array -> 'a' but given a     '(string * string) array -> seq' The type 'int list -> 'a' does not match the type 'string'`

**Known workarounds**

none

**Related information**

Some fonts are not so good at differentiating these three glyphs. Those fonts will eventually be improved or fall out of use, so this simple fix should not be passed over for lack of 100% good fonts.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.