0

I have a generic class Field[T]. Now, I want to created and child class extends Field[T] with one more parameters. But I got compile error

class Field[T](val name: String, val label: String, val required: Boolean, val dataType: DataType[T])

class FK[T](override val name: String, override val label: String, override val required: Boolean, override val dataType: DataType[T], val ref: Type) extends Field[T]

Maybe I don't really understand Scala inheritance and generic. Please help me correct FK class.

1
  • 2
    1) Too many undefined symbols, not minimal reproducible example 2) You don't invoke Fields constructor anywhere. Commented Dec 29, 2018 at 5:53

1 Answer 1

4

You have to be more specific as to what is being inherited.

... extends Field[T](name,label,required,dataType)
Sign up to request clarification or add additional context in comments.

1 Comment

@khacsinhcs Please upvote or accept the answer as a way to say thank you. Your comment is likely to be deleted, comments like this are not expected here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.