parent
6faad3ec3a
commit
5eb4e1a659
1 changed files with 1 additions and 1 deletions
|
|
@ -1535,7 +1535,7 @@ Likewise, supertrait methods may also be called on trait objects.
|
|||
# impl Shape for int { fn area(&self) -> f64 { 0.0 } }
|
||||
# impl Circle for int { fn radius(&self) -> f64 { 0.0 } }
|
||||
# let mycircle = 0;
|
||||
let mycircle: Circle = ~mycircle as ~Circle;
|
||||
let mycircle = box mycircle as Box<Circle>;
|
||||
let nonsense = mycircle.radius() * mycircle.area();
|
||||
~~~~
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue