There was an error while loading. Please reload this page.
1 parent 5a3fb20 commit 2fb7cbdCopy full SHA for 2fb7cbd
README.md
@@ -73,17 +73,16 @@ println("sayHello")
73
```
74
75
Without having an instance of the type for nested case classes:
76
-```scala
77
- import com.github.dwickern.macros.NameOf._
78
-
79
- case class Pet(age: Int)
80
- case class Person(name: String, pet : Pet)
81
82
- println(qualifiedNameOf[Person](_.pet.age))
+```scala mdoc:nest
+case class Pet(age: Int)
+case class Person(name: String, pet: Pet)
83
84
- // compiles to:
+println(qualifiedNameOf[Person](_.pet.age))
+```
+// compiles to:
85
86
- println("pet.age")
+println("pet.age")
87
88
89
You can also use `nameOfType` to get the unqualified name of a type:
0 commit comments