Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95191e8f4045e7fa3895a72da063e6c6b04ae053
      
https://github.com/WebKit/WebKit/commit/95191e8f4045e7fa3895a72da063e6c6b04ae053
  Author: Gerald Squelart <[email protected]>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M Source/WTF/wtf/Expected.h
    M Tools/TestWebKitAPI/Tests/WTF/Expected.cpp

  Log Message:
  -----------
  Fix `Expected(unexpect, ...)`
https://bugs.webkit.org/show_bug.cgi?id=261485
rdar://problem/115401559

Reviewed by Cameron McCormack.

The constructor taking `unexpect` was using the wrong `value_tag`, in most 
cases it would
just fail to build (which could explain why it's not used anywhere yet). In the 
worst
case, it could have built an apparent "expected" result in unexpected 
situations.

And even after using the correct `error_tag`, the constructor was not passing 
the correct
argument type to the base constructor.

* Source/WTF/wtf/Expected.h:
(std::experimental::fundamentals_v3::expected::expected):
* Tools/TestWebKitAPI/Tests/WTF/Expected.cpp:
(TestWebKitAPI::TEST):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to