[new compiler] Fix location of id property in error messages
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 10 Feb 2014 20:00:49 +0000 (21:00 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 17 Feb 2014 07:49:04 +0000 (08:49 +0100)
Change-Id: If7cde17acb1dd63a51e2e31415533a21302d8b41
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qqmlcodegenerator.cpp

index f933465..57b7bb5 100644 (file)
@@ -1059,8 +1059,8 @@ bool QQmlCodeGenerator::setId(const AST::SourceLocation &idLocation, AST::Statem
         COMPILE_EXCEPTION(idLocation, tr("Property value set multiple times"));
 
     _object->idIndex = registerString(idQString);
-    _object->locationOfIdProperty.line = loc.startLine;
-    _object->locationOfIdProperty.column = loc.startColumn;
+    _object->locationOfIdProperty.line = idLocation.startLine;
+    _object->locationOfIdProperty.column = idLocation.startColumn;
 
     return true;
 }