aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2')
-rw-r--r--sources/shiboken2/doc/typesystemvariables.rst2
-rw-r--r--sources/shiboken2/generator/shiboken2/shibokengenerator.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken2/doc/typesystemvariables.rst b/sources/shiboken2/doc/typesystemvariables.rst
index b1b9bbfe6..73d4dd12c 100644
--- a/sources/shiboken2/doc/typesystemvariables.rst
+++ b/sources/shiboken2/doc/typesystemvariables.rst
@@ -150,6 +150,8 @@ Variables
since it otherwise would be indistinguishable from the pointer assignment
above.
+ It is possible to use "auto" as type.
+
.. _converttopython:
**%CONVERTTOPYTHON[CPPTYPE]**
diff --git a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
index e41c91716..34e43a4c7 100644
--- a/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
+++ b/sources/shiboken2/generator/shiboken2/shibokengenerator.cpp
@@ -2047,7 +2047,7 @@ void ShibokenGenerator::replaceConverterTypeSystemVariable(TypeSystemConverterVa
QString varName = list.at(1).trimmed();
if (!varType.isEmpty()) {
const QString conversionSignature = conversionType->cppSignature();
- if (varType != conversionSignature)
+ if (varType != QLatin1String("auto") && varType != conversionSignature)
qFatal("%s", qPrintable(msgConversionTypesDiffer(varType, conversionSignature)));
c << getFullTypeName(conversionType) << ' ' << varName;
writeMinimalConstructorExpression(c, conversionType);