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

add function call type checks #122

Merged
merged 4 commits into from
May 10, 2024
Merged

add function call type checks #122

merged 4 commits into from
May 10, 2024

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented May 7, 2024

Checks the parameters are of the correct type:

mod Test {
    fn main() -> i32 {
        let x: u32 = 1;
        return hello(x);
    }

    fn hello(a: i32) -> i32 {
        return a * 2;
    }
}

Checks the parameter count matches:

mod Test {
    fn main() -> i32 {
        return hello(1, 2);
    }

    fn hello(a: i32) -> i32 {
        return a * 2;
    }
}

Copy link

github-actions bot commented May 7, 2024

Benchmarking factorial

Compiling factorial (factorial.con)
Finished release in 29.597938ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 62.08 ms
Rust Result = 2432902008176640000 Time taken : 61.99 ms

Benchmarking fib

Compiling fib (fib.con)
Finished release in 25.853483ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 135.97 ms
Rust Result = 6765 Time taken : 85.25 ms

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

Attention: Patch coverage is 40.81633% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 61.61%. Comparing base (27904dc) to head (5644d2f).

Files Patch % Lines
crates/concrete_check/src/lib.rs 0.00% 29 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
- Coverage   61.63%   61.61%   -0.02%     
==========================================
  Files          25       25              
  Lines        4329     4364      +35     
==========================================
+ Hits         2668     2689      +21     
- Misses       1661     1675      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from llvm18 to main May 7, 2024 10:49
crates/concrete_check/src/lib.rs Outdated Show resolved Hide resolved
crates/concrete_driver/tests/checks.rs Outdated Show resolved Hide resolved
crates/concrete_driver/tests/checks.rs Outdated Show resolved Hide resolved
@edg-l edg-l requested a review from igaray May 8, 2024 09:39
@edg-l edg-l added this pull request to the merge queue May 10, 2024
Merged via the queue into main with commit 56a8221 May 10, 2024
6 checks passed
@edg-l edg-l deleted the add_fncall_checks branch May 10, 2024 10:55
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

Successfully merging this pull request may close these issues.

4 participants