Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
All field or method references within a class must begin with "self." now.
A bare reference to a field or method in the same class will no longer
typecheck.
1. Enforce mutability declarations on class fields. Don't allow any
mutation of class fields not declared as mutable (except inside the
constructor).
2. Handle classes correctly in shape (treat classes like records).
This was resulting in a different error message depending on whether
the private method you were trying to call was in the same crate
or a different one.
Cross-crate method calls don't work yet. Added
run-pass/class-method-cross-crate to test that, but it's xfailed
References to fields within methods don't work yet. Added
run-pass/class-methods to test that, but it's also xfailed
Cross-crate metadata for classes works well enough that programs with
classes in other crates compile successfully, but output wrong results.
Checking in work so far to avoid merge hassles. (Tests are xfailed.)