Unused JS var in unused function + conditional causes QQmlEngine to crash on loading
问题 This has got to be the weirdest Qt bug I've encountered so far, an unused var in a non-executed function results in a hard crash on QQmlEngine::load() . It takes those few lines of code to reproduce it: import QtQuick 2.7 import QtQuick.Window 2.2 Window { id: main visible: true width: 500 height: 300 function foo() { var c = main.width > 1 ? 27 : -147 } } It crashes on both 5.7 and 5.7.1, "stock" GCC builds from the Qt website under windoze 7 x64 and ubuntu 16.04. Adding a simple console.log