@@ -16,7 +16,9 @@ object ValueEnumMacros {
16
16
*/
17
17
def findIntValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
18
18
c : Context
19
- ): c.Tree = {
19
+ )(implicit
20
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
21
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
20
22
findValueEntriesImpl[ValueEntryType , ContextUtils .CTInt , Int ](c)(identity)
21
23
}
22
24
@@ -26,7 +28,9 @@ object ValueEnumMacros {
26
28
*/
27
29
def findLongValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
28
30
c : Context
29
- ): c.Tree = {
31
+ )(implicit
32
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
33
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
30
34
findValueEntriesImpl[ValueEntryType , ContextUtils .CTLong , Long ](c)(identity)
31
35
}
32
36
@@ -39,7 +43,9 @@ object ValueEnumMacros {
39
43
*/
40
44
def findShortValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
41
45
c : Context
42
- ): c.Tree = {
46
+ )(implicit
47
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
48
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
43
49
findValueEntriesImpl[ValueEntryType , ContextUtils .CTInt , Short ](c)(
44
50
_.toShort
45
51
) // do a transform because there is no such thing as Short literals
@@ -53,7 +59,9 @@ object ValueEnumMacros {
53
59
*/
54
60
def findStringValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
55
61
c : Context
56
- ): c.Tree = {
62
+ )(implicit
63
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
64
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
57
65
findValueEntriesImpl[ValueEntryType , String , String ](c)(identity)
58
66
}
59
67
@@ -65,7 +73,9 @@ object ValueEnumMacros {
65
73
*/
66
74
def findByteValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
67
75
c : Context
68
- ): c.Tree = {
76
+ )(implicit
77
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
78
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
69
79
findValueEntriesImpl[ValueEntryType , ContextUtils .CTInt , Byte ](c)(_.toByte)
70
80
}
71
81
@@ -77,7 +87,9 @@ object ValueEnumMacros {
77
87
*/
78
88
def findCharValueEntriesImpl [ValueEntryType : c.WeakTypeTag ](
79
89
c : Context
80
- ): c.Tree = {
90
+ )(implicit
91
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
92
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
81
93
findValueEntriesImpl[ValueEntryType , ContextUtils .CTChar , Char ](c)(identity)
82
94
}
83
95
@@ -89,7 +101,9 @@ object ValueEnumMacros {
89
101
ProcessedValue
90
102
](c : Context )(
91
103
processFoundValues : ValueType => ProcessedValue
92
- ): c.Tree = {
104
+ )(implicit
105
+ typeTag : c.WeakTypeTag [IndexedSeq [ValueEntryType ]]
106
+ ): c.Expr [IndexedSeq [ValueEntryType ]] = {
93
107
import c .universe ._
94
108
val typeSymbol = weakTypeOf[ValueEntryType ].typeSymbol
95
109
EnumMacros .validateType(c)(typeSymbol)
0 commit comments