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

Object generics #82

Closed
giann opened this issue Sep 13, 2022 · 0 comments · Fixed by #201
Closed

Object generics #82

giann opened this issue Sep 13, 2022 · 0 comments · Fixed by #201
Assignees
Labels
language Issue related to the language
Milestone

Comments

@giann
Copy link
Collaborator

giann commented Sep 13, 2022

object Population<T> {
    [T] population,

    fun count() > num {
        return this.population.len();
    }
}

Population<str> myPopulation = Population<str>{
    population = [str, "joe", "john", "burt"],
};

myPopulation.count() == 3;
@giann giann added feature language Issue related to the language labels Sep 13, 2022
@giann giann added this to the 0.2.0 milestone Sep 13, 2022
@giann giann removed the feature label Dec 27, 2022
@giann giann modified the milestones: 0.4.0, 0.3.0 Sep 22, 2023
@giann giann self-assigned this Sep 29, 2023
@giann giann mentioned this issue Oct 4, 2023
@giann giann closed this as completed in #201 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language Issue related to the language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant