-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flambda-backend: Make
assert false
behave as local_ or not, dependi…
…ng on what's better (+ 2 bugfixes) (#1899) * Add test cases * Refactor is_local_returning_function; improve error * Actually allow [assert false] to imply [local_] * Add test case around local newtype annotations * Look through newtypes with layout annotations
- Loading branch information
1 parent
0706cec
commit e65faae
Showing
3 changed files
with
171 additions
and
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(* TEST | ||
* expect | ||
flags = "-extension layouts_beta" | ||
*) | ||
|
||
let foo _t (type a) = local_ 1 | ||
let bar _t (type a : value) = local_ 2 | ||
|
||
[%%expect{| | ||
val foo : 'a -> local_ int = <fun> | ||
val bar : 'a -> local_ int = <fun> | ||
|}] |
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