-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use two tokens for open private/export private (#1050)
- Loading branch information
1 parent
9dcf294
commit 01f4969
Showing
3 changed files
with
43 additions
and
2 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,4 @@ | ||
/-! | ||
This file contains a private declaration. It's tested in `openPrivate.lean`. | ||
-/ | ||
private def secretNumber : Nat := 2 |
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,37 @@ | ||
|
||
import Batteries.Tactic.OpenPrivate | ||
|
||
import BatteriesTest.OpenPrivateDefs | ||
|
||
|
||
|
||
/-- error: unknown identifier 'secretNumber' -/ | ||
#guard_msgs in | ||
#eval secretNumber | ||
|
||
|
||
-- It works with one space between the tokens | ||
/-- info: 2 -/ | ||
#guard_msgs in | ||
open private secretNumber from BatteriesTest.OpenPrivateDefs in | ||
#eval secretNumber | ||
|
||
|
||
-- It also works with other kinds of whitespace between the tokens | ||
|
||
/-- info: 2 -/ | ||
#guard_msgs in | ||
open private secretNumber from BatteriesTest.OpenPrivateDefs in | ||
#eval secretNumber | ||
|
||
|
||
/-- info: 2 -/ | ||
#guard_msgs in | ||
open | ||
private secretNumber from BatteriesTest.OpenPrivateDefs in | ||
#eval secretNumber | ||
|
||
/-- info: 2 -/ | ||
#guard_msgs in | ||
open /- Being sneaky! -/ private secretNumber from BatteriesTest.OpenPrivateDefs in | ||
#eval secretNumber |