In Scala, what does
trait A <: B
mean? Is it just the same as
trait A extends B
?
Edit
Looking at the Scala Language Specification, it seems to mean the same thing. The description for trait only mentions the trait A extends B
syntax. But the Scala syntax summary uses extends
and <:
interchangeably for trait definitions:
TraitTemplateOpt ::= Extends TraitTemplate | [[Extends] TemplateBody]
Extends ::= ‘extends’ | ‘<:’