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

obj methods can't be type polymorphic independently of the obj #1001

Closed
brson opened this issue Oct 3, 2011 · 2 comments
Closed

obj methods can't be type polymorphic independently of the obj #1001

brson opened this issue Oct 3, 2011 · 2 comments

Comments

@brson
Copy link
Contributor

brson commented Oct 3, 2011

type filesearch = obj {
    fn sysroot() -> fs::path;
    fn lib_search_paths() -> [fs::path];
    fn get_target_lib_path() -> fs::path;
    fn get_target_lib_file_path(file: fs::path) -> fs::path;
    fn search<@T>(pick: pick<T>) -> option::t<T>;
};

fn search doesn't parse. This should be possible.

@nikomatsakis
Copy link
Contributor

I was just doing some searching and came across this issue: my one comment is that object polymorphic methods only make sense if we do not monomorphize. Or at least they can only be used in a limited fashion (only for boxes or something like that).

@marijnh
Copy link
Contributor

marijnh commented Jan 13, 2012

Obj? There is no obj.

@marijnh marijnh closed this as completed Jan 13, 2012
lht added a commit that referenced this issue Apr 8, 2012
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
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

3 participants