From e8195ababb631f66c331d9a39eeac47dc98e0e45 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Sun, 16 Dec 2012 14:50:19 -0600 Subject: [PATCH 1/2] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 + From 3b733137e7cbd5a30a80e59a18c49d19c1332e98 Mon Sep 17 00:00:00 2001 From: Nathaniel Bauernfeind Date: Sun, 16 Dec 2012 15:04:42 -0600 Subject: [PATCH 2/2] A field with the type of another classes internal class caused an exception. --- .../scalabeans/sig/ScalaTypeCompiler.scala | 1 + .../sig/ScalaTypeCompilerTest.scala | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/test/scala/org/scalastuff/scalabeans/sig/ScalaTypeCompilerTest.scala 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] + } +}