File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
main/scala/net/codingwell/scalaguice
test/scala/net/codingwell/scalaguice Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,11 @@ private [scalaguice] object TypeConversions {
103
103
val clazz = mirror.staticClass(owner.asClass.fullName)
104
104
Some (mirror.runtimeClass(clazz))
105
105
} else if (! owner.isPackage && owner.isClass) {
106
- Some (mirror.runtimeClass(owner.asClass))
106
+ try {
107
+ Some (mirror.runtimeClass(owner.asClass))
108
+ } catch {
109
+ case _:ClassNotFoundException => None
110
+ }
107
111
} else {
108
112
None
109
113
}
Original file line number Diff line number Diff line change @@ -137,5 +137,9 @@ class TypeLiteralSpec extends FunSpec with Matchers {
137
137
it(" should handle anyval" ) {
138
138
typeLiteral[LongAnyVal ] shouldEqual new TypeLiteral [LongAnyVal ] {}
139
139
}
140
+
141
+ it(" should handle deep nested static class" ) {
142
+ typeLiteral[DeepInterface .Bar .Foo ] shouldEqual new TypeLiteral [DeepInterface .Bar .Foo ] {}
143
+ }
140
144
}
141
145
}
You can’t perform that action at this time.
0 commit comments