Update stdlib, compiler, and tests to new kind system
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
This commit is contained in:
parent
8f8ebb550c
commit
f6491bb426
94 changed files with 327 additions and 489 deletions
|
@ -6,7 +6,7 @@
|
|||
// Tests for standalone blocks as expressions with dynamic type sizes
|
||||
type compare<T> = fn@(T, T) -> bool;
|
||||
|
||||
fn test_generic<T>(expected: T, eq: compare<T>) {
|
||||
fn test_generic<copy T>(expected: T, eq: compare<T>) {
|
||||
let actual: T = { expected };
|
||||
assert (eq(expected, actual));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue