Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b541f3acecef57ddfee4268fb84008d4fad60dde
      
https://github.com/WebKit/WebKit/commit/b541f3acecef57ddfee4268fb84008d4fad60dde
  Author: Tadeu Zagallo <tzaga...@apple.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Overload.cpp
    M Source/WebGPU/WGSL/TypeCheck.cpp
    M Source/WebGPU/WGSL/tests/invalid/overload.wgsl

  Log Message:
  -----------
  [WGSL] Don't attempt to resolve overloads when one of the arguments is bottom
https://bugs.webkit.org/show_bug.cgi?id=254741
rdar://107420386

Reviewed by Myles C. Maxfield.

We use the bottom type to avoid expurious error messages related to a previous
error that has already been reported. In this case, if one of the arguments is
bottom it means that some invalid expressionn made its way into the arguments
and we already reported an error for it. If we attempt to resolve the overload
we'll unnecessarily report another error, since overload resolution will fail.

* Source/WebGPU/WGSL/Overload.cpp:
(WGSL::OverloadResolver::conversionRankImpl const):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::chooseOverload):
* Source/WebGPU/WGSL/tests/invalid/overload.wgsl:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to