asoft
sea

~ tiny vessels of code slowly floating out to sea

Powered by a motorboat called the S.S.Tumblr

1 year ago

@12:28am

Comments

scope escaping shadow of peter pan

I just thought the error message the following code generates was a little silly.

object PeterPan {
  private case class Shadow(length: Int)
  def shadow = Shadow(10)
}

error: private class Shadow escapes its defining scope as part of type PeterPan.Shadow
  1. coderspiel reblogged this from asoftsea
  2. asoftsea posted this
blog comments powered by Disqus