Commit 069d4482 authored by Mikhail I. Izmestev's avatar Mikhail I. Izmestev

Fix non unique TypeInfo with const value.

This is affected enum definitions, each should have unique TypeInfo
instance with value.

loadType return cached instance of TypeInfo, so it will be shared and
can't be used to store constant value.

Constants may contain only basic (integral) type value.
loadType can be replaced with direct loading of basic TypeInfo.
parent a0812f16
......@@ -351,7 +351,7 @@ TypeInfoPtr loadType( const SymbolPtr &symbol )
NumVariant constVal;
symbol->getValue( constVal );
ptr = loadType( symbol->getType() );
ptr = TypeInfo::getBaseTypeInfo(symbol->getType());
dynamic_cast<TypeInfoImp*>( ptr.get() )->setConstant( constVal );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment