Changeset View
Changeset View
Standalone View
Standalone View
duchain/expressionvisitor.cpp
Context not available. | |||||
226 | forever { | 226 | forever { | ||
---|---|---|---|---|---|
227 | AbstractType::Ptr type; | 227 | AbstractType::Ptr type; | ||
228 | if (it->element->parameterType) { | 228 | if (it->element->parameterType) { | ||
229 | //don't use openTypeFromName as it uses cursor for findDeclarations | 229 | auto parameterType = it->element->parameterType; | ||
230 | DeclarationPointer decl = findDeclarationImport(ClassDeclarationType, | 230 | if (parameterType->objectType) { | ||
231 | identifierForNamespace(it->element->parameterType, m_editor)); | 231 | //don't use openTypeFromName as it uses cursor for findDeclarations | ||
232 | if (decl) { | 232 | DeclarationPointer decl = findDeclarationImport(ClassDeclarationType, | ||
233 | type = decl->abstractType(); | 233 | identifierForNamespace(parameterType->objectType, m_editor)); | ||
234 | if (decl) { | ||||
235 | type = decl->abstractType(); | ||||
236 | } | ||||
237 | } else if (parameterType->arrayType != -1) { | ||||
238 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeArray)); | ||||
239 | } else if (parameterType->boolType != -1) { | ||||
240 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeBoolean)); | ||||
241 | } else if (parameterType->floatType != -1) { | ||||
242 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeFloat)); | ||||
243 | } else if (parameterType->intType != -1) { | ||||
244 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeInt)); | ||||
245 | } else if (parameterType->stringType != -1) { | ||||
246 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeString)); | ||||
234 | } | 247 | } | ||
235 | } else if (it->element->arrayType != -1) { | | |||
236 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeArray)); | | |||
237 | } else if (it->element->callableType != -1) { | | |||
238 | type = AbstractType::Ptr(new IntegralType(IntegralType::TypeMixed)); | | |||
239 | } else if (it->element->defaultValue) { | 248 | } else if (it->element->defaultValue) { | ||
240 | ExpressionVisitor v(m_editor); | 249 | ExpressionVisitor v(m_editor); | ||
241 | it->element->defaultValue->ducontext = m_currentContext; | 250 | it->element->defaultValue->ducontext = m_currentContext; | ||
Context not available. |