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

Preconditions on arguments don't satisfy subsequent calls with the same precondition #694

Closed
brson opened this issue Jul 14, 2011 · 1 comment

Comments

@brson
Copy link
Contributor

brson commented Jul 14, 2011

pred p(int i) -> bool { true }

fn f(int i) : p(i) -> int { i }

fn g(int i) : p(i) -> int { f(i) }

Function g doesn't typecheck because the precondition on f isn't satisfied. I would expect this to work, otherwise I can't push the responsibility for satisfying preconditions up the call stack.

@catamorphism
Copy link
Contributor

Yeah, that's definitely a bug. I'll take a look.

@ghost ghost assigned catamorphism Jul 14, 2011
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
PTHREAD_PROCESS_PRIVATE needs to be a 16-bit type on Solaris

Compiles of libc on Solaris fail because we're trying to assign a 32-bit constant to a 16-bit struct member.
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
Update now that proc macros can expand to macro_rules.
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Reduce compiletest code for easier decoupling

* Add modifications copyright

* Remove unused function `get_lib_name`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants