rustc gets confused with classes that implement polymorphic ifaces #2936

Closed
eholk opened this Issue Jul 17, 2012 · 4 comments

Projects

None yet

3 participants

@eholk
eholk commented Jul 17, 2012

Here's a test case, and the compile error.

https://gist.github.com/3126225

@catamorphism catamorphism was assigned Jul 17, 2012
@nikomatsakis
Collaborator

It looks like the type parameter is not being instantiated to a fresh tvar. A mite confusing.

@catamorphism

As I mentioned to @nikomatsakis earlier, I have a fix for this... but it breaks other test cases, so I'm still trying to figure out whether my fix was wrong or I exposed another bug.

@nikomatsakis
Collaborator

@catamorphism sorry forgot to look at that with you today. Maybe you can gist the patch?

@nikomatsakis
Collaborator

(or just push it to your local repo)

@catamorphism catamorphism added a commit that closed this issue Aug 29, 2012
@catamorphism catamorphism In ty::impl_traits, treat structs properly
Treat structs just like impls: use their associated list of
trait refs to get the list of traits that one of them implements.
I don't understand what was happening before, but it was wrong.

Closes #2936
a70e37b
@catamorphism catamorphism was unassigned by eholk Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment