diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js b/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js new file mode 100644 index 0000000000..83426c425c --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/jsimport/importWithNoImports.js @@ -0,0 +1,11 @@ +// This js file has no imports, and so should inherit +// scope from the QML file which includes it. + +function componentError() { + var i = 5; + var errorIsOne = Component.error == 1; + if (errorIsOne == true) { + i = i + 7; + } + return i; +} |