Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
122
Issues
122
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
f7b732b8
Commit
f7b732b8
authored
Mar 28, 2018
by
Raphael Rieu-Helft
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return void even if the last instruction has a non-unit return value
parent
be2d63b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/mlw/cprinter.ml
src/mlw/cprinter.ml
+8
-5
No files found.
src/mlw/cprinter.ml
View file @
f7b732b8
...
...
@@ -682,7 +682,7 @@ module MLToC = struct
|
_
->
assert
false
end
else
let
e
=
let
e
'
=
match
(
query_syntax
info
.
syntax
rs
.
rs_name
,
query_syntax
info
.
converter
rs
.
rs_name
)
with
...
...
@@ -752,10 +752,13 @@ module MLToC = struct
C
.(
[]
,
if
env
.
computes_return_value
then
if
(
ity_equal
rs
.
rs_cty
.
cty_result
Ity
.
ity_unit
)
then
Sseq
(
Sexpr
e
,
Sreturn
Enothing
)
else
Sreturn
e
else
Sexpr
e
)
begin
match
e
.
e_ity
with
|
I
ity
when
ity_equal
ity
Ity
.
ity_unit
->
Sseq
(
Sexpr
e'
,
Sreturn
Enothing
)
|
I
_
->
Sreturn
e'
|
_
->
assert
false
end
else
Sexpr
e'
)
|
Elet
(
ld
,
e
)
->
begin
match
ld
with
|
Lvar
(
pv
,
le
)
->
(* not a block *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment