aboutsummaryrefslogtreecommitdiff
path: root/tests/run/inline-constant-in-constructor-2.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/inline-constant-in-constructor-2.scala')
-rw-r--r--tests/run/inline-constant-in-constructor-2.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run/inline-constant-in-constructor-2.scala b/tests/run/inline-constant-in-constructor-2.scala
new file mode 100644
index 000000000..a8d351ab6
--- /dev/null
+++ b/tests/run/inline-constant-in-constructor-2.scala
@@ -0,0 +1,14 @@
+
+abstract class A {
+ def s: Boolean = { println("s"); r }
+ def r: Boolean
+}
+
+object Test extends A {
+ assert({ println("assert"); r == s }) // r constant type replaced by false
+ override val r: false = {
+ println("r init")
+ false
+ }
+ def main(args: Array[String]): Unit = {}
+}