Skip to content

Fix typo #3075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _ja/overviews/reflection/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Scala コンパイラが持つ型情報を全ては入手できない可能性

上の例では、まず `scala.reflect.runtime.universe` をインポートして
(型タグを使うためには必ずインポートされる必要がある)、`l` という名前の `List[Int]` を作る。
次に、context bound を持った型パラメータ `T` を持つ `getTypeTag` というメソッドは定義する
次に、context bound を持った型パラメータ `T` を持つ `getTypeTag` というメソッドを定義する
(REPL が示すとおり、これは暗黙の evidence パラメータを定義することに等価であり、コンパイラは `T` に対する型タグを生成する)。
最後に、このメソッドに `l` を渡して呼び出し、`TypeTag` に格納される型を返す `tpe` を呼び出す。
見ての通り、正しい完全な型 (つまり、`List` の具象型引数を含むということ) である `List[Int]` が返ってきた。
Expand Down