dlang-community / Pegged

A Parsing Expression Grammar (PEG) module, using the D programming language.
534 stars 66 forks source link

compilation fails with dip1000 #292

Open John-Colvin opened 4 years ago

John-Colvin commented 4 years ago

E.g. If I put -preview=dip1000 in to dflags and run dub test:

Generating test runner configuration 'pegged-test-default' for 'default' (library).
Performing "unittest" build using /home/john/dlang/dmd-2.092.0/linux/bin64/dmd for x86_64.
pegged 0.4.5-beta.2: building configuration "pegged-test-default"...
pegged/grammar.d-mixin-981(998,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-981(1164,7): Error: template instance pegged.grammar.__unittest_L979_C1.GenericTest1!(ParseTree) error instantiating
pegged/grammar.d-mixin-1004(1034,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1004(1668,7): Error: template instance pegged.grammar.__unittest_L999_C1.GenericTerminals!(ParseTree) error instantiating
pegged/grammar.d-mixin-1098(1120,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1098(1466,7): Error: template instance pegged.grammar.__unittest_L999_C1.GenericStructure!(ParseTree) error instantiating
pegged/grammar.d-mixin-1197(1217,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1197(1491,7): Error: template instance pegged.grammar.__unittest_L999_C1.GenericPrefixSuffix!(ParseTree) error instantiating
pegged/grammar.d-mixin-1309(1327,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1309(1529,7): Error: template instance pegged.grammar.__unittest_L999_C1.GenericCaseInsensitive!(ParseTree) error instantiating
pegged/grammar.d-mixin-1318(1336,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1318(1538,7): Error: template instance pegged.grammar.__unittest_L999_C1.GenericCaseSensitive!(ParseTree) error instantiating
pegged/grammar.d-mixin-1330(1350,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1330(1624,7): Error: template instance pegged.grammar.__unittest_L1328_C1.GenericIndentation!(ParseTree) error instantiating
pegged/grammar.d-mixin-1361(1377,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1361(1546,7): Error: template instance pegged.grammar.__unittest_L1359_C1.GenericTest!(ParseTree) error instantiating
pegged/grammar.d-mixin-1383(1410,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1383(1936,7): Error: template instance pegged.grammar.__unittest_L1381_C1.GenericArrows!(ParseTree) error instantiating
pegged/grammar.d-mixin-1533(1552,38): Error: cannot implicitly convert expression toDelegate(& named) of type ParseTree delegate(ParseTree a0) pure nothrow @system to ParseTree delegate(ParseTree)
pegged/grammar.d-mixin-1533(1790,7): Error: template instance pegged.grammar.__unittest_L1531_C1.GenericSpaces!(ParseTree) error instantiating
/home/john/dlang/dmd-2.092.0/linux/bin64/dmd failed with exit code 1.

I was able to do a combination of dustmite and manual reduction and report it as a dmd bug: https://issues.dlang.org/show_bug.cgi?id=20904