Skip to content

Commit 100ba0e

Browse files
committed
add instructions for viewing contents of .tasty files to Tasty Overview
1 parent 003e160 commit 100ba0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scala3/guides/tasty-overview.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ $ scalac | Hello.scala | -> | Hello.tasty | -> | Hello.class |
5252
information)
5353
```
5454

55+
You can view the contents of a _.tasty_ file in a human-readable form by running the compiler on it with the `-print-tasty` flag.
56+
You can also view the contents decompiled in a form similar to Scala source code using the `-decompile` flag.
57+
```bash
58+
$ scalac -print-tasty hello.tasty
59+
$ scalac -decompile hello.tasty
60+
```
61+
5562
### The issue with _.class_ files
5663

5764
Because of issues such as [type erasure][erasure], _.class_ files are actually an incomplete representation of your code.

0 commit comments

Comments
 (0)