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
co19/LanguageFeatures/Super-parameters/semantics_A06_t10 test fails with RuntimeError on the VM because default values of super-parameters are incorrect.
classS {
int s1;
int s2;
S(this.s1, [this.s2 =42]);
}
classCextendsS {
int i1;
int i2;
C(this.i1, super.s1, int x, [super.s2]) :this.i2 = x;
}
Kernel:
class S extends core::Object {
field core::int s1;
field core::int s2;
constructor •(core::int s1, [core::int s2 = #C1]) → sem::S
: sem::S::s1 = s1, sem::S::s2 = s2, super core::Object::•()
;
}
class C extends sem::S {
field core::int i1;
field core::int i2;
constructor •(core::int i1 = #C1, core::int s1, core::int x, [core::int s2 = #C2]) → sem::C
: sem::C::i1 = i1, sem::C::i2 = x, super sem::S::•(s1, s2)
;
}
#C1 = 42
#C2 = null
Here s2 parameter in C should have a default value #C1 (42), but it has a default value #C2 (null). Parameter i1 is not optional, so it shouldn't have a default value at all.
co19/LanguageFeatures/Super-parameters/summary_A04_t01, co19/LanguageFeatures/Super-parameters/summary_A04_t02 and co19/LanguageFeatures/Super-parameters/type_inference_A05_t01 also fail with RuntimeError due to this bug.
This is a part of #47525.
co19/LanguageFeatures/Super-parameters/semantics_A06_t10
test fails with RuntimeError on the VM because default values of super-parameters are incorrect.Kernel:
Here
s2
parameter inC
should have a default value#C1
(42), but it has a default value#C2
(null). Parameteri1
is not optional, so it shouldn't have a default value at all./cc @johnniwinther @chloestefantsova
The text was updated successfully, but these errors were encountered: