Undefined identifier error with enum in the separate module
Nemanja Borić
4burgos at gmail.com
Sat Feb 1 07:47:21 PST 2014
Hello,
I am having troubles to use the enum defined in the separate module.
When I try to access it, I am getting "Undefined symbol" error:
// CodeEnum.d
enum CodeEnum
{
OK = 200,
FAIL = 400
}
unittest
{
auto e = CodeEnum.OK; // Works!
}
// Reply.d
import CodeEnum;
unittest
{
auto.e = CodeEnum.OK; // Error: undefined identifier 'OK'
}
What I am doing wrong?
Thanks,
Nemanja
More information about the Digitalmars-d-learn
mailing list