diff --git a/pom.xml b/pom.xml index 03ce049..93700b1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scalastuff scalabeans jar - 0.3 + 0.4-SNAPSHOT ScalaBeans Reflection toolkit for Scala http://scalastuff.org @@ -194,4 +194,4 @@ https://oss.sonatype.org/content/repositories/snapshots - \ No newline at end of file + diff --git a/src/main/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompiler.scala b/src/main/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompiler.scala index d9bd966..4b69555 100644 --- a/src/main/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompiler.scala +++ b/src/main/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompiler.scala @@ -153,6 +153,7 @@ class ScalaTypeCompiler(scalaType: ScalaType, classDecl: ClassDecl) { def getTypeDecl(t: Type): TypeDecl = t match { case tp: TypeProjection => tp.parent match { + case ptp: TypeProjection => getTypeDecl(ptp) case st: SingletonType => st.path match { case mp: MemberPath => diff --git a/src/test/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompilerTest.scala b/src/test/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompilerTest.scala new file mode 100644 index 0000000..89cb8a1 --- /dev/null +++ b/src/test/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompilerTest.scala @@ -0,0 +1,19 @@ +package org.scalastuff.scalabeans.sig + +import org.junit.Test + +/** + * For some reason these test helper classes have to be at the top level scope. The test did not fail if the classes + * were in the scope of the test class or test function. + */ +class OuterTestClass { + class InnerTestClass +} +class Container(val inner: OuterTestClass#InnerTestClass) + +class ScalaTypeCompilerTest { + @Test + def testInnerClassExtractable() { + ScalaTypeCompiler.classInfoOf[Container] + } +}