Skip to content

Instantly share code, notes, and snippets.

@liufengyun
Created November 18, 2025 16:45
Show Gist options
  • Select an option

  • Save liufengyun/a34aeb315c6fde18fae563534da833fd to your computer and use it in GitHub Desktop.

Select an option

Save liufengyun/a34aeb315c6fde18fae563534da833fd to your computer and use it in GitHub Desktop.
class Box[T]
private var value: T
end
def foo(x: Box[Int]): Int = x.value
def testSectionType(show: A.B.Show[Int]) = show(19)
def testSectionFun() = A.qux()
section A
def bar(): Int = 10
private def qux(): Int = 20
private section B
type Show[T] = T => String
def testQux() = A.qux()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment