paulbutcher/ScalaMock — Issue #11: generated mocks for objects with nested classes do not compile
Author: archevel
Created: 2012-02-15 10:33:34+00:00
State: open

Compiling the GeneratedMockFactory created when mocking the object below causes compilation errors.

```scala
package com.test
object ObjectWithNestedClass {

class NestedClass {
def meth = "nested class method"
}

}
```

then the GeneratedMockFactory will define the implicit conversion:
```
implicit def toMock$27(m: com.test.ObjectWithNestedTypes#NestedClass) = m.asInstanceOf[com.test.Mock$$ObjectWithNestedTypes#Mock$NestedClass]
```
the supplied argument should be of type ```com.test.ObjectWithNestedTypes.NestedClass```