D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17984 - compile error using DMD v2.077.0-160
Summary: compile error using DMD v2.077.0-160
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 22:10 UTC by orfeo
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description orfeo 2017-11-15 22:10:39 UTC
I cannot compile [pegged](https://github.com/PhilippeSigaud/Pegged) with dmd v2.077.0-160

```
$ dmd --version
DMD64 D Compiler v2.077.0-160-g03e806aba
Copyright (c) 1999-2017 by Digital Mars written by Walter Bright
```
So:
```
$ git clone git@github.com:PhilippeSigaud/Pegged.git
$ cd Pegged

$ dub --force
Performing "debug" build using dmd for x86_64.
pegged 0.4.2+commit.13.g6308f57: building configuration "default"...
pegged/dynamic/grammar.d(270,21): Error: undefined identifier __switch in module object
pegged/dynamic/grammar.d(296,17): Error: undefined identifier __switch in module object
pegged/dynamic/grammar.d(189,9): Error: undefined identifier __switch in module object
pegged/dynamic/grammar.d(351,5): Error: undefined identifier __switch in module object
pegged/introspection.d(194,9): Error: undefined identifier __switch in module object
pegged/introspection.d(255,9): Error: undefined identifier __switch in module object
pegged/introspection.d(298,9): Error: undefined identifier __switch in module object
/usr/include/dlang/dmd/std/traits.d(1560,9): Error: undefined identifier __switch in module object
/usr/include/dlang/dmd/std/traits.d(1426,70): Error: CTFE failed because of previous errors in extractAttribFlags
/usr/include/dlang/dmd/std/typecons.d(4414,29): Error: template instance std.traits.functionAttributes!(ParseTree function(ParseTree) @system) error instantiating
/usr/include/dlang/dmd/std/functional.d(1301,13):        instantiated from here: generateFunction!("FuncInfo_doIt", "doIt", ParseTree function(ParseTree) @system)
/usr/include/dlang/dmd/std/functional.d(1342,38):        instantiated from here: DelegateFaker!(ParseTree function(ParseTree) @system)
pegged/parser.d(153,38):        instantiated from here: toDelegate!(ParseTree function(ParseTree) @system)
pegged/parser.d(2115,7):        instantiated from here: GenericPegged!(ParseTree)
/usr/include/dlang/dmd/std/functional.d(1301,13): Error: CTFE failed because of previous errors in generateFunction
pegged/tester/testerparser.d(49,9): Error: undefined identifier __switch in module object
dmd failed with exit code 1.
```

My environment
```
$ uname --all
Linux abe 4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux

$ dub --version
DUB version 1.6.0, built on Nov  3 2017
```


See also https://github.com/PhilippeSigaud/Pegged/issues/237
Comment 1 Jonathan Marler 2017-12-11 17:09:59 UTC
I'm also seeing this error compiling phobos with the latest dmd compiler.
...
std\traits.d(1560): Error: undefined identifier __switch in module object
std\traits.d(1560): Error: undefined identifier __switch in module object
std\traits.d(1560): Error: undefined identifier __switch in module object
...

I'm on windows.
Comment 2 Jonathan Marler 2017-12-11 17:18:46 UTC
Ah wait a minute, I updated my druntime repository and the error went away.