This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 213101

Summary: enum based specializations are not resolved
Product: cnd Reporter: Vladimir Voskresensky <vv159170>
Component: Code ModelAssignee: petrk
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Voskresensky 2012-05-28 14:13:56 UTC
even when I turn on all deep template expression evaluations, specializations are not resolved:


enum E {
    VAL1,
    VAL11,
    VAL111,
    VAL1111,
    VAL11111
};

template<int V> struct A{
    
};

template<> struct A<VAL1> {
    void VAL1();
};

template<> struct A<VAL11> {
    void VAL11();
};

template<> struct A<VAL111> {
    void VAL111();
};

template<> struct A<VAL1111> {
    void VAL1111();
};

template<> struct A<VAL11111> {
    void VAL11111();
};

static const E val = VAL11111;

/*
 * 
 */
int main(int argc, char** argv) {
    A<val> var1;
    var1.VAL11111(); // unresolved
    A<4> var21;
    var21.VAL11111(); // unresolved
    return 0;
}

---------------
only resolved construction is (no any flags needed):
    A<VAL11111> var2;
    var2.VAL11111();
Comment 1 Vladimir Voskresensky 2012-05-28 14:14:11 UTC
I used:
-J-Dcnd.modelimpl.expression.evaluator.deep.variable.provider=true -J-Dcnd.modelimpl.expression.evaluator.recursive.calc=true -J-Dcnd.modelimpl.expression.evaluator.extra.spec.params.matching=true