Is it possible to define a bottom class in a sublattice of Scala's type hierarchy? -


say have abstract class a. want define final class abot such class b extends a (except nothing), abot subclass of b. it's nothing, respect hierarchy a top.

answer no.

a class not subtype of x unless explicitly extend x.

scala.nothing exception because scala compiler magic you.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -