Files
qt-creator/tests/auto/qml/codemodel/check/new-expression.qml
Christian Kamm 03689eeb50 QmlJS checks: Allow calling some builtin constructors as functions.
String, Boolean, Number and Object perform type conversion. Date returns
the current date.

Change-Id: I51e5bcbb0fa85ceb30b3ee3749f96c3e3b12ca21
Reviewed-on: http://codereview.qt-project.org/6043
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
2011-10-12 08:50:26 +02:00

20 lines
318 B
QML

import Qt 4.7
Item {
function foo() {
a = new A
a = new A()
a = new a // 307 17 17
a = new a() // 307 17 17
}
function foo() {
a = A() // 306 13 13
a = a()
a = Number("abc")
a = String(12)
a = Boolean(12)
a = Date()
}
}