summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-28828.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-28828.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-28828.rs b/src/test/ui/issues/issue-28828.rs
new file mode 100644
index 000000000..03968809e
--- /dev/null
+++ b/src/test/ui/issues/issue-28828.rs
@@ -0,0 +1,18 @@
+// run-pass
+pub trait Foo {
+ type Out;
+}
+
+impl Foo for () {
+ type Out = bool;
+}
+
+fn main() {
+ type Bool = <() as Foo>::Out;
+
+ let x: Bool = true;
+ assert!(x);
+
+ let y: Option<Bool> = None;
+ assert_eq!(y, None);
+}