-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: miscompilation in constant folding
closes #4306
- Loading branch information
1 parent
007b423
commit 948a241
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/-- | ||
info: 12776324570088369205 | ||
-/ | ||
#guard_msgs in | ||
#eval (123456789012345678901).toUInt64 | ||
|
||
/-- | ||
info: 12776324570088369205 | ||
-/ | ||
#guard_msgs in | ||
#eval (123456789012345678901).toUInt64.toNat | ||
|
||
/-- | ||
error: application type mismatch | ||
Lean.ofReduceBool false._nativeDecide_1 true (Eq.refl true) | ||
argument has type | ||
true = true | ||
but function has type | ||
Lean.reduceBool false._nativeDecide_1 = true → false._nativeDecide_1 = true | ||
-/ | ||
#guard_msgs in | ||
theorem false : False := by | ||
have : (123456789012345678901).toUInt64.toNat = 123456789012345678901 := by native_decide | ||
simp [Nat.toUInt64] at this |