----
module e2_def;

import std.string;

static enum ENUM_2 { D, E, F };

char[] toString(ENUM_2)
{
        return "ENUM_2";
}
--
module main;
import std.string : toString;
import std.stdio;
import e2_def : ENUM_2, toString;

enum ENUM { A,B }

char[] toString(ENUM e_){return "ENUM";}

void main (){
        writefln( toString(3) );
        writefln( toString(ENUM.A) );
        writefln( toString(ENUM_2.D) );
}
----
3
ENUM
ENUM_2

Yep seems to work like that.

Reply via email to