Assume we have the following primary and secondary constructors:
open class Animal(val name:String){
internal constructor(message:InputStream): this(readName(message))
}
Why is not possible to call the internal constructor of the super class?
class Dog(name:String):Animal(name){
internal constructor(message:InputStream):super(message)
^^^^^
Primary constructor call expected
}
edit
Obviously it compiles when the primary constructor is converted to a secondary constructor or removed at all.
class Dog:Animal{
constructor(name:String):super(name)
internal constructor(message:InputStream):super(message)
}
Is this a compiler bug?