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
I ran into this while testing the dot shorthands CFE implementation for static gets.
It seems that the non_ambiguity_A01_t02 has the error: Error: A value of type 'Object' can't be assigned to a variable of type 'C'. which I believe is due to e2.
I tried testing the same code on without a shorthand and I get the same error.
// No shorthand, still errors.classC {
int value;
C(this.value);
staticC id =C(0);
}
extensiononbool {
intget id =>42;
}
main() {
bool e1 =2>1; // truevar e2 ="value";
Object o =<C>{C(1)};
if (o isSet<C>) {
o = {e1?C.id: e2}; // Error: A value of type 'Object' can't be assigned to a variable of type 'C'.
}
}
Could we fix the test so that we don't have that error? Thanks!
The text was updated successfully, but these errors were encountered:
kallentu
added
the
bad-test
Report tests in need of updates. When closed, the tests should be considered good
label
Feb 25, 2025
kallentu
changed the title
Static-access-shorthand/non_ambiguity_A01_t02 - Not compiling even without dot shorthand?
Static-access-shorthand/non_ambiguity_A01_t02 - Unexpected error in test
Feb 25, 2025
I ran into this while testing the dot shorthands CFE implementation for static gets.
It seems that the
non_ambiguity_A01_t02
has the error:Error: A value of type 'Object' can't be assigned to a variable of type 'C'.
which I believe is due toe2
.I tried testing the same code on without a shorthand and I get the same error.
Could we fix the test so that we don't have that error? Thanks!
cc. @sgrekhov @eernstg
The text was updated successfully, but these errors were encountered: