Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4970e2c82c4dcc36328a9046af2962b9eff3c3aa
      
https://github.com/WebKit/WebKit/commit/4970e2c82c4dcc36328a9046af2962b9eff3c3aa
  Author: Tadeu Zagallo <[email protected]>
  Date:   2025-05-05 (Mon, 05 May 2025)

  Changed paths:
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/overload-errors.wgsl

  Log Message:
  -----------
  [WGSL] Compound assignment needs to check resulting type matches assignee
https://bugs.webkit.org/show_bug.cgi?id=292434
rdar://150521467

Reviewed by Mike Wyrzykowski.

Compound assignment such as `a /= b` is effectively type checked as `a = a / b`,
but most compound operators have overloads that mix vectors and scalars, such
as `f32 / vec2f -> vec2f`, but that would result in assigning a `vec2f` to an
`f32` var, which shouldn't be allowed. To fix that we simply the check resulting
type against the original type of the assignee.

* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/tests/overload-errors.wgsl:

Canonical link: https://commits.webkit.org/294512@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to