[bug] qmllint doesn't recognize ValueTypeBehavior pragma is Assertable, introduced in Qt 6.8 (Qt Version 6.10.2)
-
qmllint from Qt Version 6.10.2 doesn't recognize the pragma introduced in 6.8 as of the official docs shown below.
❯ where.exe qmllint C:\Qt\6.10.2\msvc2022_64\bin\qmllint.exeUnknown argument "Assertable" to pragma ValueTypeBehavior [syntax] pragma ValueTypeBehavior: Addressable, Assertable ^^^^^^Another attribute to the ValueTypeBehavior pragma is Assertable, introduced in Qt 6.8. Due to a mistake in Qt 6.6 and 6.7 the a as rect above not only checks whether a is a rect but also constructs a rect if a is of a compatible type. This is obviously not what a type assertion should do. Specifying Assertable prevents this behavior and restricts type assertions for value types to only check for the type. You should always specify it if you are going to use value types with as. In any case, if the type assertion for a value type fails, the result is undefined.
valuetypebehavior docs -
qmllint from Qt Version 6.10.2 doesn't recognize the pragma introduced in 6.8 as of the official docs shown below.
❯ where.exe qmllint C:\Qt\6.10.2\msvc2022_64\bin\qmllint.exeUnknown argument "Assertable" to pragma ValueTypeBehavior [syntax] pragma ValueTypeBehavior: Addressable, Assertable ^^^^^^Another attribute to the ValueTypeBehavior pragma is Assertable, introduced in Qt 6.8. Due to a mistake in Qt 6.6 and 6.7 the a as rect above not only checks whether a is a rect but also constructs a rect if a is of a compatible type. This is obviously not what a type assertion should do. Specifying Assertable prevents this behavior and restricts type assertions for value types to only check for the type. You should always specify it if you are going to use value types with as. In any case, if the type assertion for a value type fails, the result is undefined.
valuetypebehavior docs@shyney7 Thank you for highlighting this issue. I have created a bug report on your behalf: https://qt-project.atlassian.net/browse/QTBUG-144585
If you find any other issues, please report it directly to our bug tracker like the link above. You can log in using the same Qt Account that you use to log into this forum.