Title: [236435] trunk/Tools
- Revision
- 236435
- Author
- [email protected]
- Date
- 2018-09-24 16:04:06 -0700 (Mon, 24 Sep 2018)
Log Message
[WHLSL] Casting user-created types to themselves should always work
https://bugs.webkit.org/show_bug.cgi?id=189113
Patch by Thomas Denney <[email protected]> on 2018-09-24
Reviewed by Myles C. Maxfield.
Casting user-defined types to themselves worked already, but we didn't
test it anywhere.
* WebGPUShadingLanguageRI/Test.js:
(tests.selfCasts):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (236434 => 236435)
--- trunk/Tools/ChangeLog 2018-09-24 22:59:23 UTC (rev 236434)
+++ trunk/Tools/ChangeLog 2018-09-24 23:04:06 UTC (rev 236435)
@@ -1,3 +1,16 @@
+2018-09-24 Thomas Denney <[email protected]>
+
+ [WHLSL] Casting user-created types to themselves should always work
+ https://bugs.webkit.org/show_bug.cgi?id=189113
+
+ Reviewed by Myles C. Maxfield.
+
+ Casting user-defined types to themselves worked already, but we didn't
+ test it anywhere.
+
+ * WebGPUShadingLanguageRI/Test.js:
+ (tests.selfCasts):
+
2018-09-24 Zan Dobersek <[email protected]>
Unreviewed build fix for Jhbuild-using ports.
Modified: trunk/Tools/WebGPUShadingLanguageRI/Test.js (236434 => 236435)
--- trunk/Tools/WebGPUShadingLanguageRI/Test.js 2018-09-24 22:59:23 UTC (rev 236434)
+++ trunk/Tools/WebGPUShadingLanguageRI/Test.js 2018-09-24 23:04:06 UTC (rev 236435)
@@ -6505,6 +6505,24 @@
(e) => e instanceof WTrapError);
}
+tests.selfCasts = function()
+{
+ let program = doPrep(`
+ struct Foo {
+ int x;
+ }
+ test int foo()
+ {
+ Foo foo;
+ foo.x = 21;
+ Foo bar = Foo(foo);
+ bar.x = 42;
+ return foo.x + bar.x;
+ }
+ `);
+ checkInt(program, callFunction(program, "foo", []), 21 + 42);
+}
+
tests.pointerToMember = function()
{
checkFail(
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes