From 45ed67910943ea5e12a02021f0117e554558f55e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 13 Aug 2020 13:12:19 +0200 Subject: [PATCH] Fix #9248: Add test --- tests/pos/i9248.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/pos/i9248.scala diff --git a/tests/pos/i9248.scala b/tests/pos/i9248.scala new file mode 100644 index 000000000000..edbd23552a36 --- /dev/null +++ b/tests/pos/i9248.scala @@ -0,0 +1,8 @@ +class C(var a: Int) + +extension (c: C) + def foo: Int = c.a + def foo_=(a: Int): Unit = c.a = a + +val c = C(10) +val test = c.foo