aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-19 13:25:04 -0700
committerGraydon Hoare <[email protected]>2010-07-19 13:25:04 -0700
commit1f0656d9084970fcc02ba9c27277265b8b3b7217 (patch)
tree6e01b1b764e009ac48a12666f5d270faf056067f /src/boot
parentFix over-optimistic resolution of self-methods within obj scopes. There is no... (diff)
downloadrust-1f0656d9084970fcc02ba9c27277265b8b3b7217.tar.xz
rust-1f0656d9084970fcc02ba9c27277265b8b3b7217.zip
Add a test for an obvious-seeming (but not actually legal) kind of cast attempted in issue #115, downgrade bug to an err in type.ml so you get a better message.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/me/type.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index a631e58d..13f25778 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -261,9 +261,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
else
LTYPE_poly ((Array.map (fun p -> p.Common.node) params), ty)
| Ast.MOD_ITEM_type _ ->
- Common.bug
- ()
- "internal_check_mod_item_decl: unexpected mod item type"
+ Common.err None "Type-item used in non-type context"
in
let rec internal_check_base_lval