Skip to content

Fixed error in detailed inlining steps #2426

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 2 commits into from
Jun 9, 2022
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions _overviews/scala3-macros/tutorial/inline.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ val x = 2
val x2 = x * x
x2 * {
if (0 == 0) 1.0
else if (0 % 2 == 1) x * power(x, 0 - 1) // dead branch
else power(x * x, 0 / 2) // dead branch
else if (0 % 2 == 1) x * power(x2, 0 - 1) // dead branch
else power(x2 * x2, 0 / 2) // dead branch
}
// partially evaluated to
val x = 2
Expand Down