1
0
Fork 0
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:
Markus Schorn 2008-05-29 07:43:37 +00:00
parent a09663e375
commit 732a995791
2 changed files with 3 additions and 3 deletions

View file

@ -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);
}

View file

@ -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);