aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp b/sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp
index 4a8ad79c9..c88dd7a53 100644
--- a/sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp
+++ b/sources/shiboken6/ApiExtractor/tests/testresolvetype.cpp
@@ -126,14 +126,18 @@ public:
fixture->classType.decideUsagePattern();
for (const auto &f : fixture->klass->findFunctions(u"Test"_qs)) {
- if (f->arguments().size() != 1)
- return -3;
- const auto type = f->arguments().constFirst().type();
- if (type.name() == u"int")
- fixture->intType = type;
- else
- fixture->stringType = type;
+ if (f->functionType() == AbstractMetaFunction::ConstructorFunction
+ && f->arguments().size() == 1) {
+ const auto type = f->arguments().constFirst().type();
+ if (type.name() == u"int")
+ fixture->intType = type;
+ else
+ fixture->stringType = type;
+ }
}
+ if (fixture->intType.isVoid() || fixture->stringType.isVoid())
+ return -3;
+
return 0;
}