aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2011-01-25 18:15:19 -0500
committerRafael Ávila de Espíndola <[email protected]>2011-01-25 18:16:52 -0500
commit1b82060c5e40e0b4e996bcd30deccd2a523c7590 (patch)
tree13eb7356df6235fb560be3a8e5d5310c71b774d4 /src/test/compile-fail
parentSmall first step in expr_path. Call find_final_def just to detect (diff)
downloadrust-1b82060c5e40e0b4e996bcd30deccd2a523c7590.tar.xz
rust-1b82060c5e40e0b4e996bcd30deccd2a523c7590.zip
Print an error if we try to refer to a module in an expr_path.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/bad-expr-path2.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/compile-fail/bad-expr-path2.rs b/src/test/compile-fail/bad-expr-path2.rs
new file mode 100644
index 00000000..a2f58f8e
--- /dev/null
+++ b/src/test/compile-fail/bad-expr-path2.rs
@@ -0,0 +1,10 @@
+// error-pattern: can't refer to a module as a first-class value
+
+mod m1 {
+ mod a {
+ }
+}
+
+fn main(vec[str] args) {
+ log m1.a;
+}