Brian Anderson
0a503228f6
rustc: Typecheck crust functions as *u8
2012-02-14 11:24:09 -08:00
Niko Matsakis
520c3f5f79
correct error message and add to test
2012-02-13 07:33:16 -08:00
Niko Matsakis
4eb52f69a9
do not fail if iface/impl method have different number of parameters
2012-02-13 06:50:58 -08:00
Niko Matsakis
a7641e99e8
remove leading ::, new tests
2012-02-13 06:50:58 -08:00
Brian Anderson
005a3efb8b
test: Fix cros-crate-glob-collision
2012-02-11 18:20:02 -08:00
Niko Matsakis
3f15a28b16
correct fully qualified type names to include the crate; add tests (take 2)
...
This reverts commit fc023d91c7
.
2012-02-11 14:09:52 -08:00
Niko Matsakis
fc023d91c7
Revert prior commit until I have time to track down the valgrind error
...
This reverts commit 2ec3a0b608
.
2012-02-11 09:49:02 -08:00
Niko Matsakis
2ec3a0b608
correct fully qualified type names to include the crate; add tests
...
fixes #1745
2012-02-10 21:53:17 -08:00
Brian Anderson
17110fb28b
test: Add tests for #1802
2012-02-10 15:43:35 -08:00
Marijn Haverbeke
7f1ea3ef6a
Don't allow binding patterns to bind keywords
...
Closes #1586
2012-02-10 15:54:47 +01:00
Marijn Haverbeke
74d4e2a32e
Add compile-fail tests for interfaces/impls
...
Closes #1475
2012-02-10 13:31:33 +01:00
Brian Anderson
80cd6aa96e
test: Update and un-xfail compile-fail/tag-that-dare-not...
2012-02-05 18:06:54 -08:00
Niko Matsakis
9f0239ce9c
add a test where mode inference ought to fail
2012-02-05 13:59:09 -08:00
Kevin Atkinson
5ef53382ae
Add support for parsing quasi-quotes, doesn't do anything useful yet.
2012-02-03 20:23:49 -07:00
Marijn Haverbeke
c976b7c623
Fix tests for str::le patch
2012-02-03 14:32:23 +01:00
Kevin Cantu
8f367ebfeb
Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
...
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01 21:56:53 -08:00
Kevin Cantu
c71667d9d2
Propagating unsafe::slice 4
2012-02-01 21:56:53 -08:00
Marijn Haverbeke
856a544d0c
Remove native types from stdlib
2012-02-01 12:23:13 +01:00
Tim Chevalier
e5d095d67e
Change option::t to option
...
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.
The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00
Tim Chevalier
fba35e1a3c
Require alts to be exhaustive
...
middle::check_alt does the work. Lots of changes to add default cases
into alts that were previously inexhaustive.
2012-01-31 10:08:24 -08:00
Brian Anderson
53dbde6cc2
rustc: Make 'attempted access of field' error non-fatal
2012-01-27 16:58:27 -08:00
Marijn Haverbeke
e48bf6f3f4
Make occurs check in ty::fixup_vars more reliable
...
It wouldn't detect cycles that went through several type vars before.
Closes #1464
2012-01-27 18:58:52 +01:00
Marijn Haverbeke
dc55c06aa3
Properly check enum types for recursion
...
Closes #742
2012-01-27 16:03:43 +01:00
Brian Anderson
28fbb19664
rustc: Switch the --no-core switch to a #[no_core] attribute
2012-01-26 16:43:33 -08:00
Brian Anderson
5610205363
rustc: Move core injection to its own module
2012-01-26 16:23:48 -08:00
Marijn Haverbeke
888262b337
Allow operator overloading of the indexing operator
...
The method `op_index` (which takes a single argument) is used for
this.
Issue #1520
2012-01-26 15:23:11 +01:00
Marijn Haverbeke
87b064b249
First stab at operator overloading
...
When no built-in interpretation is found for one of the operators
mentioned below, the typechecker will try to turn it into a method
call with the name written next to it. For binary operators, the
method will be called on the LHS with the RHS as only parameter.
Binary:
+ op_add
- op_sub
* op_mul
/ op_div
% op_rem
& op_and
| op_or
^ op_xor
<< op_shift_left
>> op_shift_right
>>> op_ashift_right
Unary:
- op_neg
! op_not
Overloading of the indexing ([]) operator isn't finished yet.
Issue #1520
2012-01-26 14:25:06 +01:00
Niko Matsakis
5e13d19cc0
s/block()/fn()/g
2012-01-23 19:06:33 -08:00
Brian Anderson
7d5d1a311e
test: Add no-reformat directive to compile-fail/issue-1362
2012-01-23 17:37:15 -08:00
Kevin Atkinson
664d9cc86f
Add regression test for issue #1362 .
...
Although its not really needed. Without that fix, reported spans will
likely be bogus if the error is within the first couple of lines
(probable around 5) of that file. Thus, many of the compile-fail
tests will fail due to incorrect location.
2012-01-23 17:37:15 -08:00
Kevin Atkinson
5e60facf78
Add regresion tests for issue #1448 and #1387 .
2012-01-23 17:37:15 -08:00
Tim Chevalier
6db688e893
Check that the names mentioned in tag exports are actually types (or variants)
...
Check that in export foo{}, foo is an enum type, and that in export
foo{bar, quux}, foo is an enum type and bar and quux are variants belonging
to foo.
2012-01-23 15:48:08 -08:00
Tim Chevalier
9dc59e1506
Export all enum variants by default; new syntax for selectively exporting variants
...
See issue 1426 for details. Now, the semantics of "export t;" where t is a tag are
to export all of t's variants as well. "export t{};" exports t but not its
variants, while "export t{a, b, c};" exports only variants a, b, c of t.
To do:
- documentation
- there's currently no checking that a, b, c are actually variants of t in the
above example
- there's also no checking that t is an enum type, in the second two examples above
- change the modules listed in issue 1426 that should have the old export
semantics to use the t{} syntax
I deleted the test export-no-tag-variants since we're doing the opposite now,
and other tests cover the same behavior.
2012-01-23 15:48:08 -08:00
Tim Chevalier
ba5cc236f7
WIP on issue 1426 (exporting all tags)
...
Support Lenny222's proposed syntax for exporting a tag without
its variants, or selected tags from a variant, in the AST and parser.
No support further down the line yet. Tests are xfailed.
2012-01-20 19:48:33 -08:00
Tim Chevalier
e36df0f6c8
Handle fail after return correctly in typestate
...
Previously, typestate would conclude that this function was
correctly diverging:
fn f() -> ! { ret; fail; }
even though it always returns to the caller. It wasn't handling the
i_diverge and i_return bits correctly in the fail case. Fixed it.
Closes #897
2012-01-20 17:26:31 -08:00
Graydon Hoare
7b1a8f0a91
Additional ; to , changes, disable "tag" and ";" in parser. Close #1430 . Close #1428 .
2012-01-19 19:29:21 -08:00
Patrick Walton
59ebe6af18
rustc: Make the pretty printer output commas after enum variants. Update all tests accordingly.
2012-01-19 18:41:06 -08:00
Kevin Atkinson
d388daa996
Remove incorrect comments from a few test cases.
2012-01-19 17:31:36 -07:00
Patrick Walton
d97783e3e5
test: "tag" -> "enum" in compile-fail
2012-01-19 16:01:47 -08:00
Patrick Walton
1731f5d709
test: Fix error patterns in name-clash-nullary
2012-01-19 14:47:43 -08:00
Niko Matsakis
882bea5b6d
Rename fn*() to fn() as originally planned.
2012-01-19 07:11:50 -08:00
Haitao Li
327a15d58c
rustc: Add a usage pass to collect one-off analyses
...
This patch starts from move the analysis which checkes of probably
incorrectly usage of `int|uint` in native fn.
Issue #1543
2012-01-19 17:27:44 +08:00
Tim Chevalier
5b028f527f
Remove support for the '.' after a nullary tag in a pattern
...
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
2012-01-19 01:04:59 -08:00
Patrick Walton
5ac57d1891
test: Don't test that tags with zero variants are supported
2012-01-18 12:43:01 -08:00
Haitao Li
f03eb96f39
rustc: Warn when int or uint is used in a native type decl
...
Issue #1403
2012-01-19 02:10:36 +08:00
Marijn Haverbeke
1375b31c1c
Store type names in crate metadata
...
Improves type error messages referring to external types.
Issue #1507
2012-01-16 12:08:00 +01:00
Marijn Haverbeke
c2fe7b6398
When pretty-printing fn types, leave off arg modes when they are the default
...
This reduces ++/&& spam in the output to a bare minimum.
Issue #1507
2012-01-16 12:08:00 +01:00
Kevin Atkinson
e1c50c4410
Don't evaluate discriminator value constants when parsing.
...
Remove disr_val from ast::variant_ and always use ty::variant_info
when the value is needed. Move what was done during parsing into
other passes, primary typeck.rs. This move also correctly type checks
the disr. value expression; thus, fixing rustc --pretty=typed when
disr. values are used.
2012-01-16 11:19:33 +01:00
Brian Anderson
3466c9b4be
rustc: Parse fn inner attributes. Closes #1506
2012-01-15 17:48:58 -08:00
Niko Matsakis
8685a1f7c4
distinguish "any closure" and "stack closure" (block)
2012-01-13 09:31:40 -08:00
Niko Matsakis
3f3bfeec27
make "native fn" the type for bare functions, remove fn exprs
2012-01-13 06:27:35 -08:00
Niko Matsakis
455f8b0d45
deprecate fn exprs and the fn() type, preferring fn@ and native fn
2012-01-13 06:27:34 -08:00
Marijn Haverbeke
d2be5b6c7a
Remove tests for objs, adjust tests that use objs
2012-01-13 11:52:13 +01:00
Kevin Atkinson
44352df57c
Cleanups to previous commits for issue #1393 .
2012-01-12 09:55:48 +01:00
Brian Anderson
35b27aa172
test: Add a test that empty records don't parse
...
Closes #1200
2012-01-11 19:45:18 -08:00
Brian Anderson
6e1f9ad1f1
rustc: Don't allow empty link_name when nolink attribute is present
...
Closes #1326
2012-01-11 19:45:18 -08:00
Kevin Atkinson
1dc3debdaf
Add support for casting enum-like tags to scalar values.
2012-01-10 15:59:57 -08:00
Kevin Atkinson
08abf8d37f
Support explicit discriminant numbers on tag variants.
...
Addresses issue #1393 .
For now disallow disr. values unless all variants use nullary
contractors (i.e. "enum-like").
Disr. values are now encoded in the crate metadata, but only when it
will differ from the inferred value based on the order.
2012-01-10 15:59:57 -08:00
Niko Matsakis
8b911587df
rename sendfn to fn~, lambda to fn@
2012-01-10 13:31:06 -08:00
Graydon Hoare
8387896dda
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
2012-01-09 16:12:48 -08:00
Marijn Haverbeke
6b20e8c88b
Fix error message case in two cfail test
...
I had made the error consistent with other errors, but forgot to
also change the tests.
2012-01-09 17:51:39 +01:00
Niko Matsakis
51364b5708
Fix #1474 : check that block args resolved to bare fns do not make use of upvars
2012-01-09 06:50:40 -08:00
Niko Matsakis
a1ef79c9d2
update to use new spawn syntax
2012-01-06 22:40:32 -08:00
Tim Chevalier
7c7559edaf
Disallow variable names that shadow tags in scope
...
Now, if you have a tag named "foo", a variable declaration like
"let foo..." is illegal. This change makes it possible to eliminate
the '.' after a nullary tag pattern in an alt (but I'll be doing
that in a future commit) -- as now it's always obvious whether a
name refers to a tag or a new declared variable.
resolve implements this change -- all the other changes are just to
get rid of existing code that declares variables that shadow tag
names.
2012-01-06 14:44:43 -08:00
Brian Anderson
c2c497ff53
rustc: Configure out #[test] functions when not testing
2012-01-05 17:31:57 -08:00
Niko Matsakis
afe792496a
correct test to reference right value
2012-01-05 10:44:38 -08:00
Niko Matsakis
f832edc369
require a non-semi expr acting as a stmt to have unit return type
2012-01-05 10:44:38 -08:00
Marijn Haverbeke
60ae1590af
Switch to new param kind bound syntax
...
And remove support for the old syntax
2012-01-05 15:50:02 +01:00
Niko Matsakis
70c808d173
extend tester so that error msgs can be attached to lines
2012-01-04 15:25:17 -08:00
Niko Matsakis
72a3667eb3
Allow tail expressions even in no_value blocks. Type checker
...
will guarantee they have unit type.
2012-01-03 13:13:52 -08:00
Marijn Haverbeke
b162f33396
Fix expected error messages for better printing of ty_ptr
2012-01-02 15:59:04 +01:00
Graydon Hoare
2ed1005bd7
On second thought, re-land pull request #1385 with backquotes; easier to grep, can change in the future.
2011-12-28 13:41:31 -08:00
Lenny222
0b9751b141
Use singlequotes in the typechecker too, to distinguish code and English
2011-12-25 20:27:09 +01:00
Graydon Hoare
f0dfbe7b1b
Register new snapshots, purge log_err and log_full in favour of log(...).
2011-12-22 17:53:53 -08:00
Graydon Hoare
389329ef1e
Merge all 3 log syntaxes, tidy up residual misuses.
2011-12-22 16:14:00 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Marijn Haverbeke
e2e077c831
Remove trivial cast checker
...
I consider the added complexity not justified at this point, and it
interacts badly with the patches for issue #828 . Feel free to discuss.
2011-12-22 15:04:00 +01:00
Niko Matsakis
66856a39b3
add tests I forgot to add
2011-12-21 08:41:41 -08:00
Niko Matsakis
627217fa55
valid cap clause for kind-ness too
2011-12-21 06:14:36 -08:00
Haitao Li
28b825d846
test: Remove 'error:' from error pattern
...
May include ansi escape code for color rendering on certain terminal.
2011-12-20 15:38:40 +08:00
Niko Matsakis
55a2fd18ec
implement capture clauses (move, in particular) and integrate
...
them into type state and so forth
2011-12-19 14:07:46 -08:00
Niko Matsakis
b2b2a430df
resolve capture clauses
2011-12-19 14:07:46 -08:00
Niko Matsakis
b0f1a5f051
when collecting free vars, track the span where it is used too
2011-12-19 14:07:46 -08:00
Niko Matsakis
98cbbbb642
impl the proper partial order between fn types
2011-12-19 14:07:46 -08:00
Marijn Haverbeke
7185ea35c3
Use quotes around tokens in parser error messages to make them more readable
...
Closes #1328
2011-12-19 09:59:51 +01:00
Marijn Haverbeke
f4acaf6934
Only look for a matching method when normal field access fails
...
We should probalby warn when defining a method foo on {foo: int} etc.
This should reduce the amount of useless typevars that are allocated.
Issue #1227
2011-12-18 19:41:44 +01:00
Graham Fawcett
f14bc54b06
allow #[link_args] with #[nolink]. For now, fail if two modules link same lib, and second has link_args.
...
I think it should undefined to have multiple modules that link in the same
library, but provide different link arguments. Unfortunately we don't track
link_args by module -- they are just appended as discovered into the crate
store -- but for now, it should be an error to provide link_args on a module
that's already been included (with or without link_args).
2011-12-16 15:29:59 -08:00
Graham Fawcett
7ddd353ef6
implement #[nolink]; deprecate #[link_name = ""]; note in stdlib to remove empty link_name.
...
Can't remove them from stdlib until the snapshotted compiler supports #[nolink].
2011-12-16 15:29:59 -08:00
Marijn Haverbeke
7efef98901
Make uses of self in impls compile
...
Get rid of expr_self_call, introduces def_self. `self` is now,
syntactically, simply a variable. A method implicitly brings a `self`
binding into scope.
Issue #1227
2011-12-16 11:46:57 +01:00
Stefan Plantikow
af8e471908
Fixed type resolution error in math tests
2011-12-14 14:54:16 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Marijn Haverbeke
3d0610b072
Check for literals that are out of range for their type
2011-12-07 21:53:05 +01:00
Stefan Plantikow
a69eab16ec
typeck: Fix for #932
2011-12-05 01:23:10 +01:00
Stefan Plantikow
4ba3158e4f
parse: typeck: enabling trivial casts of tail-call return values
...
introduces ctypes::m_* machine type aliases for int, uint, float
depending on cfg(target_arch) that are used in tests
2011-12-02 11:38:24 -08:00
Marijn Haverbeke
46e5e2f685
Be less specific in 'unresolved import' error patterns
...
To make sure different test set-ups (check-fast) don't cause the
tests to fail.
2011-12-02 17:20:03 +01:00
Marijn Haverbeke
0f918ddd8b
Make import ignore imports coming after them
...
This broke no code at all, so I guess people were already writing
imports in this style.
Issue #1228
2011-12-02 16:06:55 +01:00
Haitao Li
3e303af86b
rustc: Add a path attribute for crate directives
...
The path information was an optional "filename" component of crate
directive AST. It is now replaced by an attribute with metadata named
"path".
With this commit, a directive
mod foo = "foo.rs";
should be written as:
#[path = "foo.rs"]
mod foo;
Closes issue #906 .
2011-11-24 15:31:18 -08:00
Marijn Haverbeke
9fb3719ded
Rollback return-by-reference
...
It's proving too inflexible, so I'm ripping out the extra complexity
in the hope that regions will, at some point, provide something
similar.
Closes #918
2011-11-23 11:02:27 +01:00
Marijn Haverbeke
1b8b0b8584
Properly check for copies when constructing a record using with
...
Closes #989
2011-11-22 13:27:40 +01:00
Marijn Haverbeke
5d6a74f020
Only warn about unreachable range patterns when appropriate
...
Also simplifies the literal-munging, and moves it into ast_util
Closes #1170
2011-11-22 11:49:29 +01:00
Marijn Haverbeke
b4217b383b
Add a pass that checks that blocks are only used in safe ways
...
Closes #1188
2011-11-21 11:01:15 +01:00
Marijn Haverbeke
a7573af59d
Add some tests for new kind system
...
Issue #1177
2011-11-18 16:15:46 +01:00
Marijn Haverbeke
f6491bb426
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
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
9cf48d3753
Preparation for kind system overhaul
...
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.
Issue #1177
2011-11-18 10:52:28 +01:00
Haitao Li
388eed383f
rustc: Add a flag '--warn-unused-imports'
...
Followup of issue #889
2011-11-17 09:28:30 +01:00
Brian Anderson
b655fb9ea7
Replace 'mutable?' with 'const'
2011-11-16 14:41:32 -08:00
Haitao Li
88f29aab27
Use attributes for native module ABI and link name
...
This patch changes how to specify ABI and link name of a native module.
Before:
native "cdecl" mod llvm = "rustllvm" {...}
After:
#[abi = "cdecl"]
#[link_name = "rustllvm"]
native mod llvm {...}
The old optional syntax for ABI and link name is no longer supported.
Fixes issue #547
2011-11-16 11:35:13 -08:00
Marijn Haverbeke
9ff6f816ba
Fix handling of loops and conditionals in alias.rs
...
It now threads information about invalidated aliases through the AST
properly. This makes it more permissive for conditionals (invalidating
an alias in one branch doesn't prevent you from using it in another),
and less permissive for loops (it now properly notices when a loop
invalidates an alias that it might still use in another iteration).
Closes #1144
2011-11-15 13:29:57 +01:00
Brian Anderson
3cc2641fc3
Make various binops not typecheck for unsafe pointers. Closes #1173
2011-11-13 13:55:12 -08:00
Haitao Li
9bc2f1800d
rustc: Add support of warning on unused imports
...
Fixes issue #889
2011-11-10 19:19:10 -08:00
Brian Anderson
d26a96d2bb
Add "cdecl" as synonym for "c-stack-cdecl"
2011-11-09 16:47:44 -08:00
Brian Anderson
0f1af17a60
Remove all uses of native cdecl except for those that yield
2011-11-08 11:29:10 -08:00
Brian Anderson
9375204461
Add test for if without else cannot return result
2011-11-07 12:20:22 -08:00
Brian Anderson
413d97f8bd
Add tests for blocks that must not have results
2011-11-07 12:19:50 -08:00
Marijn Haverbeke
5945667b99
Update some more tests for 1a68a9882
2011-11-03 11:14:48 +01:00
Marijn Haverbeke
0a20eed2db
Make ptr::addr_of return an immutable vec, add mut_addr_of
2011-11-02 12:20:12 +01:00
Brian Anderson
2cebef095e
stdlib: Make io failures recoverable by returning a result
2011-10-29 01:25:11 -07:00
Marijn Haverbeke
3397fa4701
Move to short kind kinds words in test suite
...
Issue #1076
2011-10-28 14:57:49 +02:00
Matt Brubeck
361adf9f86
Add tests for the 'as' (cast) operator
2011-10-27 13:37:35 -07:00
Marijn Haverbeke
cfdf193c46
Update our code to new type parameter kind syntax
...
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke
2884c722fe
Step one towards new type param kind syntax
...
Issue #1067
Needs a snapshot to finalize.
2011-10-25 14:31:56 +02:00
Marijn Haverbeke
3b5b93221e
Remove some semicolons after block calls
...
The remaining ones can be removed after the next snapshot. (Or
we can let the next pretty-print pass take care of them.)
2011-10-21 14:24:42 +02:00
Marijn Haverbeke
050170d2af
Remove remaining uses of iter and for-each
...
Issue #1056
2011-10-21 13:34:35 +02:00
Brian Anderson
ebc61e39d7
Remove temporary fn# syntax
2011-10-20 20:34:04 -07:00
Brian Anderson
29ad3bdb10
Make fn denote a bare function. Convert fn to fn@ as needed
2011-10-20 18:23:48 -07:00
Brian Anderson
391e12124b
Tweak typecheck to enforce covariance on higher-order function arguments
2011-10-20 18:23:48 -07:00
Brian Anderson
686d6a485f
Drop the 2 from the spawn*2 functions
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
ac671c3172
Convert tests to use bare-fn spawn
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
880b1ec9f5
Fail nicer when the parser doesn't find an expected string literal
...
Closes #1028
2011-10-19 18:04:44 -07:00
Matt Brubeck
15d33f7957
Fix parse error in constrained-type-missing-check.rs
2011-10-18 16:42:00 -07:00
Brian Anderson
0f0fa26c72
Enforce variance rules for mutable types
2011-10-17 20:51:34 -07:00
Brian Anderson
4d9d889dbf
Don't allow assignment to mutable-wha?
2011-10-17 16:35:33 -07:00
Brian Anderson
bc4c3df1bf
Don't allow the value of generic bare functions to be taken
...
Issue #1038
2011-10-13 14:39:30 -07:00
Niko Matsakis
e8a0e592da
reimplement some of the unsafe stuff which got lost
...
- blocks inherit unsafety
- remove the --check-unsafe flag
- add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis
5b015288b5
new test
2011-10-12 16:33:07 -07:00
Niko Matsakis
215b1ab000
make compiler emit more than 1 error in the case of unsafe
2011-10-12 16:33:07 -07:00
Niko Matsakis
3b66806624
prohibit ptr deref unless in unsafe code
2011-10-12 16:33:07 -07:00
Niko Matsakis
a56698575c
fix error msg
2011-10-12 16:33:07 -07:00
Niko Matsakis
e8a29fbe3c
add some new tests
2011-10-12 16:33:07 -07:00
Niko Matsakis
81533ff737
add pass to check that unsafe fns cannot be used as values
2011-10-12 16:33:06 -07:00
Niko Matsakis
e39db5a100
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
24b201fa48
skip test, remove whitespace
2011-10-12 14:39:34 -07:00
Niko Matsakis
046ca827dd
Add unsafe blocks, unsafe functions, and two rudimentary tests
...
related to them
2011-10-12 14:26:47 -07:00
Brian Anderson
5b0f79b75a
Don't allow bind to produce bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Marijn Haverbeke
1efe5f0577
Fix up test for last commit
2011-10-07 16:58:27 +02:00
Marijn Haverbeke
7586082bb0
Add tests for programs that are invalid by arg-passing-style
...
Closes #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
41528dc543
Add pass-by-ref annotation to the tests to make them typecheck
...
Issue #1008
2011-10-07 10:41:39 +02:00
Brian Anderson
e1ba559c03
Test cases for #985
...
Other restrictions on pinned kinds happened to fix this
Closes #985
2011-09-28 15:35:21 -07:00
Brian Anderson
cb4e99b688
Don't allow vectors of pinned kinds
...
Vectors of pinned kinds can't be safe because most interesting uses of vector
perform copies
2011-09-28 15:35:21 -07:00
Brian Anderson
14bac217b0
Make error patterns in some kind tests more specific
2011-09-28 15:35:21 -07:00