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
caseclassA() {}
caseclassB(a: {*} A) {}
caseclassC(a: {*} A) {
varb: {a} B=nulldefsetB(b: {a} B):Unit=this.b = b
}
vala: {*} A=newA()
valb: {a} B=newB(a)
valc=newC(a)
c.setB(b) // if change this line to `c.b = b` then the code will pass
Output
[error] -- [E007] TypeMismatchError: ...
[error] 60| c.setB(b)
[error] |^
[error] |Found: (b : {a} B)
[error] |Required:B
[error] |
[error] | longer explanation available when compiling with`-explain`