File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -61,21 +61,21 @@ defined class C
61
61
scala> val nonCaseClass = new C
62
62
nonCaseClass: C = C @ 7e3131c8
63
63
64
- scala> safeStr " Doesn't work if there is a non-case class $nonCaseClass or $onlyString "
64
+ scala> safeStr " Doesn't work if there is a non-case class $nonCaseClass or $string "
65
65
<console >: 17 : error : unable to find a safe instance for class C . Make sure it is a case class or a type that has safe instance.
66
66
^
67
67
// And don't cheat by `toString`
68
- scala> safeStr " Doesn't work if there is a non-case class ${nonCaseClass.toString} or $onlyString "
69
- <console >: 17 : error : Identified `toString` being called on the types. Make sure the type has a instance of Safe ..
68
+ scala> safeStr " Doesn't work if there is a non-case class ${nonCaseClass.toString} or $string "
69
+ <console >: 17 : error : Identified `toString` being called on the types. Make sure the type has a instance of Safe .
70
70
^
71
71
```
72
72
73
73
# Concept and example usages.
74
74
75
75
` safeStr"" ` is just like ` s"" ` in scala, but it is type safe and _ allows only_ types that has a safe instance.
76
76
77
- But don't worry. If you have a case class, the macros in ` Safe.scala ` will automatically derive it's safe instance
78
- as far as all the individual fields has ` Safe ` instance .
77
+ But don't worry. If you have a case class, the macros in ` Safe.scala ` will automatically derive it's safe instance.
78
+ More on this later .
79
79
80
80
To understand more on the concepts and usages, please go through:
81
81
You can’t perform that action at this time.
0 commit comments