mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Correct scope provided by class-specializations for instantiating its base-classes.
This commit is contained in:
parent
a09663e375
commit
732a995791
2 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ public class CPPClassSpecialization extends CPPSpecialization implements
|
|||
ICPPBase specBinding = (ICPPBase) ((ICPPInternalBase)binding).clone();
|
||||
IBinding base = binding.getBaseClass();
|
||||
if (base instanceof IType) {
|
||||
IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap, getScope());
|
||||
IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap, specScope);
|
||||
specBase = SemanticUtil.getUltimateType(specBase, false);
|
||||
if (specBase instanceof IBinding && !(specBase instanceof IProblemBinding)) {
|
||||
((ICPPInternalBase)specBinding).setBaseClass((IBinding)specBase);
|
||||
|
@ -105,7 +105,7 @@ public class CPPClassSpecialization extends CPPSpecialization implements
|
|||
bindings[i] = new CPPBaseClause(bases[i]);
|
||||
IBinding base = bindings[i].getBaseClass();
|
||||
if (base instanceof IType) {
|
||||
IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap, null);
|
||||
IType specBase = CPPTemplates.instantiateType((IType) base, argumentMap, specScope);
|
||||
if (specBase instanceof ICPPClassType) {
|
||||
((CPPBaseClause) bindings[i]).setBaseClass((ICPPClassType) specBase);
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements
|
|||
ICPPBase specBase = (ICPPBase) ((ICPPInternalBase)origBase).clone();
|
||||
IBinding origClass = origBase.getBaseClass();
|
||||
if (origClass instanceof IType) {
|
||||
IType specClass = CPPTemplates.instantiateType((IType) origClass, getArgumentMap(), getScope());
|
||||
IType specClass = CPPTemplates.instantiateType((IType) origClass, getArgumentMap(), this);
|
||||
specClass = SemanticUtil.getUltimateType(specClass, true);
|
||||
if (specClass instanceof IBinding) {
|
||||
((ICPPInternalBase)specBase).setBaseClass((IBinding) specClass);
|
||||
|
|
Loading…
Add table
Reference in a new issue