MCQs > IT & Programming > Scala > For given code, Choose correct statement which explains the error?

Scala MCQs

For the code below, Choose the correct statement which explains the error?

abstract class A { type B <: C abstract class C { def superClassM(b: B): D } class EImpl extends C { def superClassM(b: B): D = { val e = func1(this, b) e } } def func1(b: B, b1: B): D = D(b, b1) case class D(a: B, b: B) } When complied produces the following error found : EImpl.this.type (with underlying type A.this.EImpl) required: A.this.B val e = func1(this, b) ^

Answer

Correct Answer: B is an abstract type

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Scala Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it