D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15909 - Duplicate case error reports characters as numbers
Summary: Duplicate case error reports characters as numbers
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 trivial
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2016-04-10 02:01 UTC by andy-hanson
Modified: 2020-11-16 00:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description andy-hanson 2016-04-10 02:01:52 UTC
This code:

	void main() {
		switch ('a') {
			case 'a': case 'a':
				break;
		}
	}

Fails with this error:

	app.d(3): Error: duplicate case 97 in switch statement

It would be nicer to use 'a' instead of 97.
Comment 1 Dlang Bot 2020-09-09 20:42:45 UTC
@Luhrel created dlang/dmd pull request #11716 "Fix Issue 15909 - Duplicate case error reports characters as numbers" fixing this issue:

- Fix Issue 15909 - Duplicate case error reports characters as numbers

https://github.com/dlang/dmd/pull/11716
Comment 2 Dlang Bot 2020-09-27 23:43:17 UTC
dlang/dmd pull request #11716 "Fix Issue 15909 - Duplicate case error reports characters as numbers" was merged into stable:

- 2bdadbb1dad8359ec8fb331c4ffc85776797ddda by Luhrel:
  Fix Issue 15909 - Duplicate case error reports characters as numbers

https://github.com/dlang/dmd/pull/11716
Comment 3 Dlang Bot 2020-10-18 03:23:20 UTC
dlang/dmd pull request #11845 "merge stable" was merged into master:

- d0a0a7e926498319117a01802bedbd94b90da6b2 by Luhrel:
  Fix Issue 15909 - Duplicate case error reports characters as numbers

https://github.com/dlang/dmd/pull/11845
Comment 4 Dlang Bot 2020-11-16 00:10:04 UTC
dlang/dmd pull request #11961 "merge stable" was merged into master:

- ccf2c7f0bcbae575b1c1794d657cf9b89717b19f by Luhrel:
  Fix Issue 15909 - Duplicate case error reports characters as numbers

https://github.com/dlang/dmd/pull/11961