invalid or corrupt file: duplicate COMDAT / Previous Definition Different
Anonymouse
asdf at asdf.net
Fri Jan 12 17:11:36 UTC 2018
On Wednesday, 10 January 2018 at 20:53:24 UTC, Anonymouse wrote:
> None of the (version specifiers in the) build configurations I
> have touch upon the part of the fairly innocent code mentioned
> in the error message, if I'm reading it right.
> (https://github.com/zorael/kameloso/blob/c00ca4489e39348bd4b1678c95c1b12636df307c/source/kameloso/plugins/common.d#L424)
struct Foo
{
this(Regex!char) { /* ... */ }
this(StaticRegex!char) { /* ... */ }
}
It seems like the problem there is that StaticRegex is only an
alias to Regex, so I'm overloading it twice. It rhymes well with
the linked bug.
/++
A $(D StaticRegex) is $(D Regex) object that contains D code
specially
generated at compile-time to speed up matching.
No longer used, kept as alias to Regex for backwards
compatibility.
+/
public alias StaticRegex = Regex; // <--
Reducing it to just that doesn't reproduce the error message
though. As long as Regex!char can house both ctRegex!"foo" and
"foo".regex it works for me.
More information about the Digitalmars-d-learn
mailing list