summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2013-08-22 17:00:02 -0400
committerBen Blum <bblum@andrew.cmu.edu>2013-08-23 17:24:14 -0400
commite9f6f3f2ccf563b39f7484025c8272da60c24dfa (patch)
tree42e2f6b59b1972cbfe75ec69d14aa97fbbb478a9 /src/test
parent2c0f9bd35493def5e23f0f43ddeba54da9d788b4 (diff)
downloadrust-e9f6f3f2ccf563b39f7484025c8272da60c24dfa.tar.gz
rust-e9f6f3f2ccf563b39f7484025c8272da60c24dfa.zip
Parse and reserve typeof keyword. #3228
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/keyword-typeof.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/compile-fail/keyword-typeof.rs b/src/test/compile-fail/keyword-typeof.rs
new file mode 100644
index 00000000000..c42875382b9
--- /dev/null
+++ b/src/test/compile-fail/keyword-typeof.rs
@@ -0,0 +1,13 @@
+// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+fn main() {
+    let typeof = (); //~ ERROR `typeof` is a reserved keyword
+}