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
In this example, the inline accessors of B.x generated by f2 override the ones generated by f1 for A.x
classA:privatevarx=0inlinedeff1():Int=
x +=1;
x
classBextendsA:privatevarx=0inlinedeff2():Int=
x +=1
x
@main deftest:Unit=valb=newB
println(b.f1())
println(b.f2())
Output
12
Expectation
Inline accessors should be final to not allow them to be overridden intentionally or accidentally.
The text was updated successfully, but these errors were encountered:
Compiler version
3.1.2
Minimized code
In this example, the inline accessors of
B.x
generated byf2
override the ones generated byf1
forA.x
Output
Expectation
Inline accessors should be final to not allow them to be overridden intentionally or accidentally.
The text was updated successfully, but these errors were encountered: