[Issue 18447] New: Error: Invalid trailing code unit; dmd/frontend.d(235): Parsing error occurred.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 15 23:27:31 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18447

          Issue ID: 18447
           Summary: Error: Invalid trailing code unit;
                    dmd/frontend.d(235): Parsing error occurred.
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timothee.cour2 at gmail.com

git at github.com:timotheecour/dtools
cd tests/bug_dmd_frontend

$dmd_current_X --version
DMD64 D Compiler v2.078.2-699-g6a2db254e-dirty

DMD=$dmd_current_X dub --single main.d

file1.d(1): Error: Invalid trailing code unit
file1.d(1): Error: declaration expected, not `#`
file1.d(1): Error: character 0x7f is not a valid token
core.exception.AssertError at ../../../../../.dub/packages/dmd-master/dmd/src/dmd/frontend.d(235):
Parsing error occurred.

$dmd_current_X -o- file1.d
#doesn't complain

not sure what's wrong with `file1.d`, eg:
ag "[\x80-\xFF]" file1.d
pcregrep --color='auto' -n '[^\x00-\x7F]' file1.d
don't show any non ascii characters

--


More information about the Digitalmars-d-bugs mailing list