```
void main()
{
import std.algorithm, std.stdio;
"aa_b".chunkBy!((a, b) => a == '_').writeln;
}
```
0x00005555558e5374 in toSymbol::ToSymbol::visit(FuncDeclaration*) (this=0x7fffffffc2f0, fd=0x7ffff7ea0230) at dmd/tocsym.d:317
317 f.Fstartline.Slinnum = fd.loc.linnum;
#0 0x00005555558e5374 in toSymbol::ToSymbol::visit(FuncDeclaration*) (this=0x7fffffffc2f0, fd=0x7ffff7ea0230) at dmd/tocsym.d:317
#1 0x000055555583b516 in FuncDeclaration::accept(Visitor*) (this=0x7ffff7ea0230, v=0x7fffffffc2f0) at dmd/func.d:2277
#2 0x00005555558e4bee in toSymbol(Dsymbol*) (s=0x7ffff7ea0230) at dmd/tocsym.d:443
#3 0x00005555558ded2d in FuncDeclaration_toObjFile(FuncDeclaration*, bool) (fd=0x7ffff7ea0230, multiobj=false) at dmd/glue.d:813
#4 0x00005555558eccc9 in toObjFile::ToObjFile::visit(FuncDeclaration*) (this=0x7fffffffc8d8, fd=0x7ffff7ea0230) at dmd/toobj.d:312
#5 0x000055555583b516 in FuncDeclaration::accept(Visitor*) (this=0x7ffff7ea0230, v=0x7fffffffc8d8) at dmd/func.d:2277
#6 0x00005555558ecc32 in toObjFile(Dsymbol*, bool) (ds=0x7ffff7ea0230, multiobj=false) at dmd/toobj.d:1371
#7 0x00005555558de3b4 in genObjFile(Module*, bool) (m=0x7ffff7e9fb60, multiobj=false) at dmd/glue.d:406
#8 0x0000555555872b91 in dmd.mars.tryMain(ulong, const(char)**) (argv=0x7fffffffd6c8, argc=2) at dmd/mars.d:949
#9 0x000055555587351b in D main () at dmd/mars.d:1098
Comment #1 by razvan.nitu1305 — 2018-03-26T11:28:40Z
What compiler version are you using? I can successfully compile the code and when I run it I get:
core.exception.AssertError@dmd/phobos/std/algorithm/iteration.d(1749): predicate is not reflexive
----------------
??:? _d_assert_msg [0x451256]
??:? pure ref std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl.Group std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl.Group.__ctor(std.typecons.RefCounted!(std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl.Impl, 1).RefCounted) [0x4427ac]
??:? pure @property std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl.Group std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl.front() [0x442c98]
??:? void std.format.formatRange!(std.stdio.File.LockingTextWriter, std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, char).formatRange(ref std.stdio.File.LockingTextWriter, ref std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, ref const(std.format.FormatSpec!(char).FormatSpec)) [0x447dad]
??:? void std.format.formatValueImpl!(std.stdio.File.LockingTextWriter, std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, char).formatValueImpl(ref std.stdio.File.LockingTextWriter, ref std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, ref const(std.format.FormatSpec!(char).FormatSpec)) [0x447d2d]
??:? void std.format.formatValue!(std.stdio.File.LockingTextWriter, std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, char).formatValue(ref std.stdio.File.LockingTextWriter, ref std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, ref const(std.format.FormatSpec!(char).FormatSpec)) [0x447d00]
??:? uint std.format.formattedWrite!(std.stdio.File.LockingTextWriter, char, std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl).formattedWrite(ref std.stdio.File.LockingTextWriter, const(char[]), std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl) [0x443e0e]
??:? void std.stdio.File.write!(std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, char).write(std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl, char) [0x4438e4]
??:? void std.stdio.writeln!(std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl).writeln(std.algorithm.iteration.ChunkByImpl!(test.main().__lambda1, immutable(char)[]).ChunkByImpl) [0x4437dc]
??:? _Dmain [0x441d9a]
Comment #2 by greensunny12 — 2018-03-26T11:35:48Z
Latest ~master though I can't reproduce it anymore either and it doesn't appear on 2.079.0, so I'm closing this.
Sorry for noise, maybe it got fixed in the meantime or I was using an "old" master compiler