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 144893

Summary: If typename keyword is used inside for init statement, unresolved ID appear
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Code ModelAssignee: Leonid Lenyashin <lsl239>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Kvashin 2008-08-22 19:32:07 UTC
In the following example (orig. from Loki),
iter in for is unresolved, 
while on the next line is ok.

template<class K, class V> 
class normal_iterator {
};

template<class K, class V> 
class AssocVector {
public:
    typedef normal_iterator<K, V> iterator;
};

    
template<class AbstractProduct, typename IdentifierType>
class Factory {
    typedef AssocVector<IdentifierType, AbstractProduct> IdToProductMap;
    void foo() {
        for(typename IdToProductMap::iterator iter; ;) { // iter is unresolved
        }
        typename IdToProductMap::iterator iter; // ok
    }
};
Comment 1 Vladimir Kvashin 2008-08-22 19:33:34 UTC

*** This issue has been marked as a duplicate of 144363 ***