Skip to content
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

Documenting compilation errors #3341

Merged
merged 235 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from 224 commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
97ac9b6
Adding quicktest
Jan 29, 2021
87f0eee
Edit per comment from Remy
Jul 14, 2022
848ae6b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 14, 2022
4194195
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 14, 2022
9b54f5f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 14, 2022
be99f87
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 14, 2022
c706f5d
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 15, 2022
63e22eb
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 15, 2022
22d7433
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 15, 2022
78c577d
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 15, 2022
5795f9f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 19, 2022
044c107
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 19, 2022
69e27cf
Merge branch 'master' into cok-quicktest
davidcok Jul 20, 2022
f42c745
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 20, 2022
9e92bd8
Merge branch 'master' into cok-quicktest
davidcok Jul 20, 2022
92825dc
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 20, 2022
e201a77
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 21, 2022
e02d6ce
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 22, 2022
0465b15
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 22, 2022
68f52ce
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 22, 2022
fe933e2
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 22, 2022
6f34117
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 22, 2022
c396e83
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jul 27, 2022
433c824
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 10, 2022
82c8060
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 11, 2022
7859237
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 15, 2022
8bd7d03
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 16, 2022
42be55b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 17, 2022
7ef5288
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 18, 2022
98c5e41
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 18, 2022
9f1e92c
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 21, 2022
d78800a
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 24, 2022
dc2f742
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 25, 2022
8b4e194
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 25, 2022
c292bae
Merge branch 'master' of https://github.com/dafny-lang/dafny
Aug 26, 2022
50702f8
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 1, 2022
c49f8a3
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 1, 2022
9c68747
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 1, 2022
aee08f5
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 2, 2022
6bba113
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 2, 2022
032e12a
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 6, 2022
e11fd63
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 7, 2022
24921df
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 14, 2022
2e3a81f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 18, 2022
91e05eb
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 20, 2022
ba9f954
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 21, 2022
47815c1
Checking included files
Sep 21, 2022
956e476
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 24, 2022
5aa1aa9
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 26, 2022
834cee3
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 27, 2022
f6b3d49
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 27, 2022
977b36a
Merge branch 'cok-quicktest' of https://github.com/davidcok/dafny
Sep 29, 2022
043986b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
710f269
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
ea10461
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
09591e8
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
408f44e
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
02ffee4
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 29, 2022
c99fbe9
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 30, 2022
f4d4a02
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 30, 2022
448cb44
Merge branch 'master' of https://github.com/dafny-lang/dafny
Sep 30, 2022
a1e28fd
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 3, 2022
77f4e1f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 4, 2022
c8dc66a
Link to snapshot for v3.9.0
Oct 4, 2022
30165e3
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 4, 2022
ad14c5c
Link to snapshot for v3.9.0
Oct 4, 2022
f9d72de
Link to snapshot for v3.9.0
Oct 4, 2022
a60dd9a
Fixing Snapshot file
Oct 5, 2022
c04d360
Some typos and workding changes
Oct 5, 2022
48ccd27
Edits to use the language of greatest predicates and greatest lemmas
Oct 5, 2022
f3ed37b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 5, 2022
9a34972
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 6, 2022
4389f19
Conflict resolution
Oct 6, 2022
473be16
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 7, 2022
0559d39
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 7, 2022
23ed17e
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 25, 2022
b4a9a3b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Oct 25, 2022
bd94cc5
Merge remote-tracking branch 'upstream/master'
Oct 28, 2022
ceb95b7
Merge remote-tracking branch 'upstream/master'
Oct 28, 2022
e7d5dea
Merge remote-tracking branch 'upstream/master'
Oct 28, 2022
b49eeda
Merge remote-tracking branch 'upstream/master'
Oct 29, 2022
ef86f34
Merge remote-tracking branch 'upstream/master'
Nov 3, 2022
12a7f03
Merge remote-tracking branch 'upstream/master'
Nov 4, 2022
bfab006
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 7, 2022
d4deeb6
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 8, 2022
f12cc28
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 18, 2022
6820ca2
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 18, 2022
9d3411f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 20, 2022
5bd3845
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 21, 2022
b548d41
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 21, 2022
ae1e30c
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 21, 2022
b527539
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 21, 2022
0713e90
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 23, 2022
f1e788e
just touching
Nov 28, 2022
4510b5d
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 29, 2022
a07d7a1
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 29, 2022
48455cc
Spurious edit on master
Nov 30, 2022
125c70e
Merge branch 'master' of https://github.com/dafny-lang/dafny
Nov 30, 2022
1fd6798
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 1, 2022
1c47231
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 2, 2022
f757e02
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 2, 2022
266e045
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 8, 2022
56b04e5
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 9, 2022
57c7af0
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 9, 2022
85be9ee
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 12, 2022
b5c8b64
Initial edits on documenting error messages
Dec 13, 2022
5f34558
Initial edits on documenting error messages
Dec 13, 2022
66bbe61
Initial edits on documenting error messages
Dec 13, 2022
c93c292
More editing
Dec 13, 2022
7707e92
Fixing typose
Dec 13, 2022
98902f4
Fixing layout
Dec 13, 2022
6ee8792
Tinkering with style
Dec 13, 2022
b96706b
Tinkering with style
Dec 13, 2022
bf87084
Tinkering with style
Dec 13, 2022
4c48cd0
Tinkering with style
Dec 13, 2022
7d7397f
Tinkering with style
Dec 13, 2022
73c31c3
Tinkering with style
Dec 13, 2022
a794bf1
Tinkering with style
Dec 13, 2022
2a1ab6b
More editing
Dec 13, 2022
be76074
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 13, 2022
c8fed8b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 14, 2022
9eee8f1
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 15, 2022
29864c7
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 15, 2022
94970bb
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 16, 2022
d72c416
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 16, 2022
9ef66f0
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 16, 2022
d0a57a9
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 20, 2022
917c5b9
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 20, 2022
4b7b4ed
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 21, 2022
8008caa
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 21, 2022
26eca7f
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 21, 2022
06930ef
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 21, 2022
087440a
Conflict resolution
Dec 21, 2022
889d5ed
Checkpoint
Dec 22, 2022
271c77b
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
415e8e6
Conflict resolution
Dec 22, 2022
f3ce788
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
92acaf1
Checkpoint
Dec 22, 2022
5485716
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
4096c4c
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
a3d9f25
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
e76a535
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 22, 2022
04c0277
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
22a34bd
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
a90bfb9
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
07ec7ec
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
8bd1311
Merge conflict
Dec 23, 2022
c1a3b09
Checkpoint
Dec 23, 2022
46b373e
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
6e86c02
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 23, 2022
6ebd49e
Merge branch 'master' into cok-2487
Dec 23, 2022
d88025e
Checkpoint
Dec 24, 2022
fd78ccf
Checkpoint
Dec 24, 2022
2eb8949
Improving error recovery and simplifying grammar
Dec 24, 2022
f611642
Bug fix in revised grammar
Dec 24, 2022
33733a6
Debugging grarmmar changes
Dec 24, 2022
330cb55
Removing unused files
Dec 24, 2022
c5a535d
Debugging fixes
Dec 24, 2022
e99aed0
Touchup to a test
Dec 24, 2022
682d1c2
Touching up tests
Dec 24, 2022
34626da
More test touchups
Dec 24, 2022
09aaa12
Test touchup
Dec 25, 2022
d798a48
Markdown touchups
Dec 25, 2022
a1e14ca
Making headings bold
Dec 25, 2022
f4b3560
More tweaks to markdown
Dec 25, 2022
3281845
Reordering to match .atg file
Dec 25, 2022
2b13df2
More edits
Dec 25, 2022
6c8e474
More tweaks
Dec 25, 2022
12672ce
Edits to the markdown pages
Dec 25, 2022
04c5231
Test touchups
Dec 25, 2022
50e6164
More tests fixed
Dec 25, 2022
df8c044
Better recovery from provides-reveals-comma problem
Dec 25, 2022
b3c68ff
Improve parser for provides-reveals-comma problem
Dec 25, 2022
e0daa7a
Fixing some LL warnings
Dec 25, 2022
f6291bc
More LL warning resolution
Dec 25, 2022
8580661
Fix parser error
Dec 25, 2022
4b957b8
Fixing up more LL ambiguities
Dec 25, 2022
630e033
Resolving LL ambiguity warnings
Dec 26, 2022
dfbd2bd
Reverting change to ModuleExport
Dec 26, 2022
2a105e3
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 27, 2022
dd74785
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 27, 2022
d44975e
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 28, 2022
5b5f6ea
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 29, 2022
5a7cd03
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Dec 29, 2022
810c360
Update docs/HowToFAQ/Errors-Parser.md
davidcok Dec 29, 2022
7d191b7
Update docs/HowToFAQ/Errors-Parser.md
davidcok Dec 29, 2022
5964583
Update docs/HowToFAQ/Errors-Parser.md
davidcok Dec 29, 2022
1931522
Review edits
Dec 29, 2022
26f5478
typo
Dec 29, 2022
d154427
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 29, 2022
2b18e7f
Merge branch 'cok-2487' of https://github.com/davidcok/dafny into cok…
Dec 29, 2022
a1fd105
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 30, 2022
9824f0e
Conflict resolution
Dec 30, 2022
29af14d
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 30, 2022
5db6020
Merge branch 'master' into cok-2487
davidcok Dec 30, 2022
7571e5d
improving error message about refining datatypes and newtypes
Dec 31, 2022
3f28a6b
Merge branch 'cok-2487' of https://github.com/davidcok/dafny into cok…
Dec 31, 2022
a322ff5
Merge branch 'master' of https://github.com/dafny-lang/dafny
Dec 31, 2022
61b5225
Merge branch 'master' into cok-2487
Dec 31, 2022
7091bdd
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 2, 2023
f868d68
Review comments
Jan 3, 2023
f62aeab
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 3, 2023
350cc1e
Master rebasae conflict
Jan 3, 2023
29c1a75
More review touchup
Jan 3, 2023
09fc024
Comment clarification
Jan 3, 2023
6f30d24
RUnning nightly-tests only on main repo
Jan 4, 2023
ab590c1
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 4, 2023
e8784ea
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 4, 2023
4ea5f26
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 6, 2023
4c37481
working and nearly complete compilation tests
Jan 8, 2023
db99768
Slight corrections
Jan 8, 2023
9cb7aae
Merge branch 'master' of https://github.com/dafny-lang/dafny
Jan 8, 2023
2d6996a
More edits and cleanup of testing
Jan 8, 2023
e117a9a
Copy edits of the Compiler section
Jan 10, 2023
8de90df
A few more copy edits
Jan 10, 2023
9f2b22c
Update Source/DafnyCore/Compilers/SinglePassCompiler.cs
davidcok Jan 11, 2023
10bb249
Update docs/check-examples
davidcok Jan 11, 2023
1769d69
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Jan 11, 2023
baa330e
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Jan 11, 2023
afd030f
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Jan 11, 2023
ef4361e
Review comments
Jan 11, 2023
afcc048
More review comments
Jan 11, 2023
19ee842
Merge branch 'master' into cok-2487
davidcok Jan 11, 2023
76766a3
Reverting change to temp file name because it means changing the expe…
Jan 11, 2023
3eff1b6
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Jan 11, 2023
9dff05f
Update docs/HowToFAQ/Errors-Compiler.md
davidcok Jan 11, 2023
89385bd
Formatting
Jan 12, 2023
1ca8209
Test fixes
Jan 12, 2023
82174f7
Test fix
Jan 12, 2023
21548cb
Merge branch 'master' into cok-2487
davidcok Jan 12, 2023
21f47a0
Test fixes
Jan 12, 2023
633bdd7
Test correction
Jan 12, 2023
e92d005
Update docs/HowToFAQ/Errors-Parser.md
davidcok Jan 12, 2023
cf872ee
Update docs/HowToFAQ/Errors-Parser.md
davidcok Jan 12, 2023
c10934c
Merge branch 'master' into cok-2487
davidcok Jan 12, 2023
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
27 changes: 12 additions & 15 deletions Source/DafnyCore/Compilers/SinglePassCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ public override void Compile(Program program, ConcreteSyntaxTree wrx) {

var wIter = CreateIterator(iter, wr);
if (iter.Body == null) {
Error(iter.tok, "Iterator {0} has no body", wIter, iter.FullName);
Error(iter.tok, "iterator {0} has no body", wIter, iter.FullName);
} else {
TrStmtList(iter.Body.Body, wIter);
}
Expand Down Expand Up @@ -1589,7 +1589,7 @@ public static bool HasMain(Program program, out Method mainMethod) {
if (member is Method m && member.FullDafnyName == name) {
mainMethod = m;
if (!IsPermittedAsMain(program, mainMethod, out string reason)) {
ReportError(program.Reporter, mainMethod.tok, "The method \"{0}\" is not permitted as a main method ({1}).", null, name, reason);
ReportError(program.Reporter, mainMethod.tok, "The method '{0}' is not permitted as a main method ({1}).", null, name, reason);
stefan-aws marked this conversation as resolved.
Show resolved Hide resolved
mainMethod = null;
return false;
} else {
Expand Down Expand Up @@ -1618,7 +1618,7 @@ public static bool HasMain(Program program, out Method mainMethod) {
hasMain = true;
} else {
// more than one main in the program
ReportError(program.Reporter, m.tok, "More than one method is marked \"{{:main}}\". First declaration appeared at {0}.", null,
ReportError(program.Reporter, m.tok, "More than one method is marked '{{:main}}'. First declaration appeared at {0}.", null,
ErrorReporter.TokenToString(mainMethod.tok));
hasMain = false;
}
Expand All @@ -1629,7 +1629,7 @@ public static bool HasMain(Program program, out Method mainMethod) {
}
if (hasMain) {
if (!IsPermittedAsMain(program, mainMethod, out string reason)) {
ReportError(program.Reporter, mainMethod.tok, "This method marked \"{{:main}}\" is not permitted as a main method ({0}).", null, reason);
ReportError(program.Reporter, mainMethod.tok, "This method marked '{{:main}}' is not permitted as a main method ({0}).", null, reason);
mainMethod = null;
return false;
} else {
Expand Down Expand Up @@ -1658,7 +1658,7 @@ public static bool HasMain(Program program, out Method mainMethod) {
hasMain = true;
} else {
// more than one main in the program
ReportError(program.Reporter, m.tok, "More than one method is declared as \"{0}\". First declaration appeared at {1}.", null,
ReportError(program.Reporter, m.tok, "More than one method is declared as '{0}'. First declaration appeared at {1}.", null,
DefaultNameMain, ErrorReporter.TokenToString(mainMethod.tok));
hasMain = false;
}
Expand All @@ -1670,7 +1670,7 @@ public static bool HasMain(Program program, out Method mainMethod) {

if (hasMain) {
if (!IsPermittedAsMain(program, mainMethod, out string reason)) {
ReportError(program.Reporter, mainMethod.tok, "This method \"Main\" is not permitted as a main method ({0}).", null, reason);
ReportError(program.Reporter, mainMethod.tok, "This method 'Main' is not permitted as a main method ({0}).", null, reason);
return false;
} else {
return true;
Expand Down Expand Up @@ -3220,7 +3220,7 @@ protected internal void TrStmt(Statement stmt, ConcreteSyntaxTree wr, ConcreteSy
var s0 = (AssignStmt)s.S0;
if (s0.Rhs is HavocRhs) {
if (DafnyOptions.O.ForbidNondeterminism) {
Error(s0.Rhs.Tok, "nondeterministic assignment forbidden by the --enforce-determinism option", wr);
Error(s0.Rhs.Tok, "nondeterministic assignment forbidden by --enforce-determinism", wr);
}
// The forall statement says to havoc a bunch of things. This can be efficiently compiled
// into doing nothing.
Expand Down Expand Up @@ -5125,22 +5125,19 @@ private ConcreteSyntaxTree MaybeInjectSubsetConstraint(IVariable boundVar, Type
IToken tok, ConcreteSyntaxTree wr, bool isReturning = false, bool elseReturnValue = false,
bool isSubfiltering = false) {
if (!boundVarType.Equals(collectionElementType, true) &&
boundVarType.NormalizeExpand(true) is UserDefinedType
{
boundVarType.NormalizeExpand(true) is UserDefinedType {
TypeArgs: var typeArgs,
ResolvedClass:
SubsetTypeDecl
{
SubsetTypeDecl {
TypeArgs: var typeParametersArgs,
Var: var variable,
Constraint: var constraint
}
}) {
if (variable.Type.NormalizeExpandKeepConstraints() is UserDefinedType
{
ResolvedClass:
if (variable.Type.NormalizeExpandKeepConstraints() is UserDefinedType {
ResolvedClass:
SubsetTypeDecl
} normalizedVariableType) {
} normalizedVariableType) {
wr = MaybeInjectSubsetConstraint(boundVar, normalizedVariableType, collectionElementType,
inLetExprBody, tok, wr, isReturning, elseReturnValue, true);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/DafnyRef/Statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ has the same meaning as

<!-- %no-check -->
```dafny
if exists x :| P { var x :| P; S } else { T }
if exists x :: P { var x :| P; S } else { T }
stefan-aws marked this conversation as resolved.
Show resolved Hide resolved
```

The identifiers bound by ``BindingGuard`` are ghost variables
Expand Down
2 changes: 1 addition & 1 deletion docs/DafnyRef/Types.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ type parameter `A` is declared to be restricted to auto-init types,
the program does not need to explicitly assign any value to the
out-parameter `a`.

### 8.1.3. Nonempty types: `T(00)`
### 8.1.3. Nonempty types: `T(00)` {#sec-nonempty-types}

Auto-init types are important in compiled contexts. In ghost contexts, it
may still be important to know that a type is nonempty. Dafny supports
Expand Down
6 changes: 4 additions & 2 deletions docs/HowToFAQ/Errors-CommandLine.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

## Error: Invalid argument _argument_ to option _option_

```bash <!-- %check-error -->
<!-- %check-cli -->
```bash
dafny resolve --function-syntax:2 mod.dfy
```

Expand All @@ -17,7 +18,8 @@ in the help document (`dafny -?` or `dafny <command> -h`).

## Error: Invalid argument _argument_ to option --quantifier-syntax

```bash <!-- %check-error -->
<!-- %check-cli -->
```bash
dafny resolve --quantifier-syntax:2 null.dfy
```

Expand Down
Loading