Bug 8346 – Literals 00 - 07 results in odd errors when used with UFCS
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-07-03T17:42:11Z
Last change time
2021-09-09T05:22:25Z
Keywords
pull
Assigned to
No Owner
Creator
Jonathan M Davis
Comments
Comment #0 by issues.dlang — 2012-07-03T17:42:11Z
This code
import std.stdio;
void main()
{
01.writeln();
}
results in this set of errors:
q.d(5): Error: found 'writeln' when expecting ';' following statement
q.d(5): Error: expression expected, not ')'
q.d(5): Error: found ';' when expecting ')'
q.d(6): Error: found '}' when expecting ';' following statement
q.d(7): Error: found 'EOF' when expecting '}' following compound statement
whereas of it's an illegal numeric literal such as 08.writeln(), you get
q.d(5): Error: found '8' when expecting ';' following statement
Numeric literals which do not begin with zero do not have this problem. I assume that it relates to how (the now deprecated) octal literals are handled.
See also bug# 8345
Comment #1 by dlang-bot — 2021-09-08T16:10:17Z
@dkorpel created dlang/dmd pull request #13059 "Fix issue 8346 - Literals 00 - 07 results in odd errors when used with UFCS" fixing this issue:
- fix issue 8346 - Literals 00 - 07 results in odd errors when used with UFCS
https://github.com/dlang/dmd/pull/13059
Comment #2 by dlang-bot — 2021-09-09T05:22:25Z
dlang/dmd pull request #13059 "Fix issue 8346 - Literals 00 - 07 results in odd errors when used with UFCS" was merged into master:
- 33bf773cee2673b3bc01879f8ca5fadb67f17bf5 by dkorpel:
fix issue 8346 - Literals 00 - 07 results in odd errors when used with UFCS
https://github.com/dlang/dmd/pull/13059