Skip to content

Commit 0343b05

Browse files
committed
Test that a class type name gets printed correctly in a...
"cannot be dereferenced" error message. Closes #2370
1 parent 2887997 commit 0343b05

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/compile-fail/issue-2370-2.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// error-pattern: type cat cannot be dereferenced
2+
class cat { new() {} }
3+
4+
fn main() {
5+
let kitty : cat = cat();
6+
log (error, *kitty);
7+
}

src/test/compile-fail/issue-2370.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// error-pattern: type cat cannot be dereferenced
2+
class cat { new() {} }
3+
4+
fn main() {
5+
let nyan = cat();
6+
log (error, *nyan);
7+
}

0 commit comments

Comments
 (0)