diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/reflection-companiontype.check | 12 | ||||
-rw-r--r-- | test/files/run/showraw_tree_ultimate.check | 20 | ||||
-rw-r--r-- | test/files/run/t6732.check | 4 | ||||
-rw-r--r-- | test/files/run/t6732.scala | 12 |
4 files changed, 32 insertions, 16 deletions
diff --git a/test/files/run/reflection-companiontype.check b/test/files/run/reflection-companiontype.check index e25605618f..f87bc04480 100644 --- a/test/files/run/reflection-companiontype.check +++ b/test/files/run/reflection-companiontype.check @@ -1,11 +1,11 @@ TypeRefs -TypeRef(ThisType(<empty>#PK), C#MODC, List()) -TypeRef(ThisType(<empty>#PK), C#CLS, List()) -TypeRef(ThisType(<empty>#PK), C#CLS, List()) +TypeRef(ThisType(<empty>#PKC), C#MODC, List()) +TypeRef(ThisType(<empty>#PKC), C#CLS, List()) +TypeRef(ThisType(<empty>#PKC), C#CLS, List()) ClassInfoTypes -TypeRef(ThisType(<empty>#PK), C#MODC, List()) -TypeRef(ThisType(<empty>#PK), C#CLS, List()) -TypeRef(ThisType(<empty>#PK), C#CLS, List()) +TypeRef(ThisType(<empty>#PKC), C#MODC, List()) +TypeRef(ThisType(<empty>#PKC), C#CLS, List()) +TypeRef(ThisType(<empty>#PKC), C#CLS, List()) Unrelated NoType NoType diff --git a/test/files/run/showraw_tree_ultimate.check b/test/files/run/showraw_tree_ultimate.check index 63f72de50b..ea64d5a7d2 100644 --- a/test/files/run/showraw_tree_ultimate.check +++ b/test/files/run/showraw_tree_ultimate.check @@ -1,12 +1,12 @@ Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.immutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#PCTOR), List()) -[1] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) -[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) -[3] TypeRef(ThisType(scala.collection.immutable#<id>#PK), scala.collection.immutable.HashMap#<id>#CLS, List()) -[4] TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) -[5] SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD) +[1] TypeRef(ThisType(scala.collection.immutable#<id>#PKC), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) +[2] MethodType(List(), TypeRef(ThisType(scala.collection.immutable#<id>#PKC), scala.collection.immutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) +[3] TypeRef(ThisType(scala.collection.immutable#<id>#PKC), scala.collection.immutable.HashMap#<id>#CLS, List()) +[4] TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) +[5] SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD) Apply[6](Select[7](New[6](TypeTree[6]().setOriginal(AppliedTypeTree(Ident[8](scala.collection.mutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)))))), nme.CONSTRUCTOR#<id>#CTOR), List()) -[4] TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) -[5] SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD) -[6] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) -[7] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PK), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) -[8] TypeRef(ThisType(scala.collection.mutable#<id>#PK), scala.collection.mutable.HashMap#<id>#CLS, List()) +[4] TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) +[5] SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD) +[6] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) +[7] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) +[8] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List()) diff --git a/test/files/run/t6732.check b/test/files/run/t6732.check new file mode 100644 index 0000000000..016c6e50c0 --- /dev/null +++ b/test/files/run/t6732.check @@ -0,0 +1,4 @@ +scala#PK: true, false, true, false +scala#PKC: false, true, true, true +scala.collection.immutable.List#MOD: true, false, false, false +scala.collection.immutable.List#MODC: false, true, false, false diff --git a/test/files/run/t6732.scala b/test/files/run/t6732.scala new file mode 100644 index 0000000000..fdc1ab04e6 --- /dev/null +++ b/test/files/run/t6732.scala @@ -0,0 +1,12 @@ +import scala.reflect.runtime.universe._ +import definitions._ + +object Test extends App { + def test(sym: Symbol): Unit = { + println(s"${showRaw(sym, printKinds = true)}: ${sym.isModule}, ${sym.isModuleClass}, ${sym.isPackage}, ${sym.isPackageClass}") + } + test(ScalaPackage) + test(ScalaPackageClass) + test(ListModule) + test(ListModule.moduleClass) +}
\ No newline at end of file |