www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18447] New: Error: Invalid trailing code unit;

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 puremagic.com
          Reporter: timothee.cour2 gmail.com

git 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: character 0x7f is not a valid token
core.exception.AssertError ../../../../../.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

--
Feb 15 2018