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

Struct generics (without impl blocks) #167

Open
wants to merge 7 commits into
base: generics
Choose a base branch
from
Open

Conversation

edg-l
Copy link
Member

@edg-l edg-l commented Jan 31, 2025

mod generic {

    struct GenericStruct<T> {
        a: T,
        b: u32,
    }

    pub fn main() -> i32 {
        let value: GenericStruct<i32> = GenericStruct::<i32> {
            a: 2,
            b: 4,
        };

        return value.a;
    }
}

@edg-l edg-l changed the base branch from main to generics January 31, 2025 13:15
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 75.22124% with 28 lines in your changes missing coverage. Please review.

Project coverage is 58.35%. Comparing base (e03908a) to head (c10effc).

Files with missing lines Patch % Lines
src/ir/lowering.rs 78.33% 13 Missing ⚠️
src/ir/mod.rs 8.33% 11 Missing ⚠️
src/ir/lowering/prepass.rs 66.66% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           generics     #167      +/-   ##
============================================
- Coverage     62.99%   58.35%   -4.64%     
============================================
  Files            21       21              
  Lines          4970     4008     -962     
============================================
- Hits           3131     2339     -792     
+ Misses         1839     1669     -170     

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

Copy link

github-actions bot commented Jan 31, 2025

Benchmarking factorial

Compiling factorial (factorial.con)
Finished release in 30.805379ms

@edg-l edg-l force-pushed the struct_generics branch 2 times, most recently from 62b300e to 6c91d7a Compare February 6, 2025 11:44
@edg-l edg-l changed the title Struct generics Struct generics (without impl blocks) Feb 6, 2025
@edg-l edg-l marked this pull request as ready for review February 7, 2025 15:05
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.

2 participants