aboutsummaryrefslogtreecommitdiff
path: root/tests/run/inline-constant-in-constructor-1.scala
blob: 11a727fd6abee449c13a426d61565f38f7033c8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
abstract class A {
  def s: Boolean = { println("s"); r }
  def r: Boolean
}

object Test extends A {
  assert({ println("assert"); r == s }) // r constant type not replaced by true, r not initialized yet
  override val r: true = {
    println("r init")
    true
  }
  def main(args: Array[String]): Unit = {}
}