You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
From @RobinMorisset:
The reference implementation currently behaves really weirdly on post-incrementing a field of a struct with an overriden setter (and getter).
It correctly uses the getter for having the current value, increment it, uses the setter for updating it.. but somehow returns the new value instead of the old one.
I believe this is a bug in the reference implementation.
Example:
struct Foo {
int z;
}
int operator.w(Foo foo) {
return 8;
}
Foo operator.w=(Foo foo, int value) {
foo.z = value;
return foo;
}
int bar() {
Foo foo;
foo.z = 3;
int value = foo.w++;
return value*100 + foo.z*10 + foo.w;
}
Calling bar() return 998 instead of 898 as I would expect.
The text was updated successfully, but these errors were encountered:
Migrated from https://bugs.webkit.org/show_bug.cgi?id=193550 on March 7, 2019
From @RobinMorisset:
The reference implementation currently behaves really weirdly on post-incrementing a field of a struct with an overriden setter (and getter).
It correctly uses the getter for having the current value, increment it, uses the setter for updating it.. but somehow returns the new value instead of the old one.
I believe this is a bug in the reference implementation.
Example:
Calling bar() return 998 instead of 898 as I would expect.
The text was updated successfully, but these errors were encountered: