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

Immutable classes aren't considered implicitly copyable #2550

Closed
pcwalton opened this issue Jun 8, 2012 · 2 comments
Closed

Immutable classes aren't considered implicitly copyable #2550

pcwalton opened this issue Jun 8, 2012 · 2 comments
Labels
A-typesystem Area: The type system
Milestone

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Jun 8, 2012

Failing testcase:

class C {
    let x: uint;

    new(x: uint) {
        self.x = x;
    }
}

fn f<T:copy>(x: T) {
}

fn main() {
    f(C(1u));
}
@ghost ghost assigned catamorphism Jun 8, 2012
@catamorphism
Copy link
Contributor

Passes but produces a warning (which it shouldn't).

@catamorphism
Copy link
Contributor

This is done, but I'm having trouble getting the lint flags to work right so that the test case will fail if the warning gets printed out. I think there's a bug in how lint settings work, but haven't isolated it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system
Projects
None yet
Development

No branches or pull requests

2 participants