File tree 6 files changed +13
-13
lines changed
docs/docs/reference/other-new-features
library/src/scala/tasty/reflect
tests/run-custom-args/Yretain-trees
6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ TASTy Reflect provides the following types:
182
182
+- TypeDefSymbol
183
183
+- DefDefSymbol
184
184
+- ValDefSymbol
185
- +- BindDefSymbol
185
+ +- BindSymbol
186
186
+- NoSymbol
187
187
188
188
```
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ package scala.tasty.reflect
105
105
* +- TypeDefSymbol
106
106
* +- DefDefSymbol
107
107
* +- ValDefSymbol
108
- * +- BindDefSymbol
108
+ * +- BindSymbol
109
109
* +- NoSymbol
110
110
*
111
111
* +- Flags
@@ -433,7 +433,7 @@ trait Core {
433
433
type ValDefSymbol = kernel.ValDefSymbol
434
434
435
435
/** Symbol representing a bind definition. */
436
- type BindDefSymbol = kernel.BindSymbol
436
+ type BindSymbol = kernel.BindSymbol
437
437
438
438
/** No symbol available. */
439
439
type NoSymbol = kernel.NoSymbol
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ package scala.tasty.reflect
104
104
* +- TypeDefSymbol
105
105
* +- DefDefSymbol
106
106
* +- ValDefSymbol
107
- * +- BindDefSymbol
107
+ * +- BindSymbol
108
108
* +- NoSymbol
109
109
*
110
110
* +- Flags
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ trait SymbolOps extends Core {
64
64
case _ => throw new Exception (" not a TypeDefSymbol" )
65
65
}
66
66
67
- /** Unsafe cast as to BindSymbol. Use IsBindDefSymbol to safely check and cast to BindSymbol */
68
- def asBindDef (implicit ctx : Context ): BindDefSymbol = self match {
69
- case IsBindDefSymbol (self) => self
70
- case _ => throw new Exception (" not a BindDefSymbol " )
67
+ /** Unsafe cast as to BindSymbol. Use IsBindSymbol to safely check and cast to BindSymbol */
68
+ def asBindDef (implicit ctx : Context ): BindSymbol = self match {
69
+ case IsBindSymbol (self) => self
70
+ case _ => throw new Exception (" not a BindSymbol " )
71
71
}
72
72
73
73
/** Annotations attached to this symbol */
@@ -210,12 +210,12 @@ trait SymbolOps extends Core {
210
210
211
211
// BindSymbol
212
212
213
- object IsBindDefSymbol {
214
- def unapply (symbol : Symbol )(implicit ctx : Context ): Option [BindDefSymbol ] =
213
+ object IsBindSymbol {
214
+ def unapply (symbol : Symbol )(implicit ctx : Context ): Option [BindSymbol ] =
215
215
kernel.matchBindSymbol(symbol)
216
216
}
217
217
218
- implicit class BindDefSymbolAPI (self : BindDefSymbol ) {
218
+ implicit class BindSymbolAPI (self : BindSymbol ) {
219
219
/** Bind pattern of this definition */
220
220
def tree (implicit ctx : Context ): Bind =
221
221
kernel.BindSymbol_tree (self)
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ object Foo {
11
11
def definitionString (tree : Tree ): Expr [String ] = tree.symbol match {
12
12
case IsDefDefSymbol (sym) => sym.tree.show.toExpr
13
13
case IsValDefSymbol (sym) => sym.tree.show.toExpr
14
- case IsBindDefSymbol (sym) => sym.tree.show.toExpr
14
+ case IsBindSymbol (sym) => sym.tree.show.toExpr
15
15
}
16
16
x.unseal match {
17
17
case Term .Inlined (None , Nil , arg) => definitionString(arg)
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ object Foo {
11
11
def definitionString (tree : Tree ): Expr [String ] = tree.symbol match {
12
12
case IsDefDefSymbol (sym) => sym.tree.show.toExpr
13
13
case IsValDefSymbol (sym) => sym.tree.show.toExpr
14
- case IsBindDefSymbol (sym) => sym.tree.show.toExpr
14
+ case IsBindSymbol (sym) => sym.tree.show.toExpr
15
15
}
16
16
x.unseal match {
17
17
case Term .Inlined (None , Nil , arg) => definitionString(arg)
You can’t perform that action at this time.
0 commit comments