From f8d1a9ff38cc0c0ce7279ca9169022eab51d6b60 Mon Sep 17 00:00:00 2001 From: Antoine Gourlay Date: Fri, 10 Oct 2014 09:02:34 +0200 Subject: SI-8875 showCode should print all class constructor modifiers. showCode used to print nothing when the only modifier was a change in visibility scope (i.e. no flags but privateWithin is set). --- test/junit/scala/reflect/internal/PrintersTest.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/junit') diff --git a/test/junit/scala/reflect/internal/PrintersTest.scala b/test/junit/scala/reflect/internal/PrintersTest.scala index ca9b4671b2..7043c26d5e 100644 --- a/test/junit/scala/reflect/internal/PrintersTest.scala +++ b/test/junit/scala/reflect/internal/PrintersTest.scala @@ -354,6 +354,13 @@ trait ClassPrintTests { | def y = "test" |}""") + @Test def testClassConstructorModifiers = assertPrintedCode("class X private (x: scala.Int)") + + @Test def testClassConstructorModifierVisibility = assertPrintedCode(sm""" + |object A { + | class X protected[A] (x: scala.Int) + |}""") + @Test def testClassWithPublicParams = assertPrintedCode("class X(val x: scala.Int, val s: scala.Predef.String)") @Test def testClassWithParams1 = assertPrintedCode("class X(x: scala.Int, s: scala.Predef.String)") -- cgit v1.2.3