summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/type-dependent/issue-63695.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/type-dependent/issue-63695.rs')
-rw-r--r--src/test/ui/const-generics/type-dependent/issue-63695.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/type-dependent/issue-63695.rs b/src/test/ui/const-generics/type-dependent/issue-63695.rs
new file mode 100644
index 000000000..08b6d4bf5
--- /dev/null
+++ b/src/test/ui/const-generics/type-dependent/issue-63695.rs
@@ -0,0 +1,15 @@
+// run-pass
+
+trait T {
+ fn test<const A: i32>(&self) -> i32 { A }
+}
+
+struct S();
+
+impl T for S {}
+
+fn main() {
+ let foo = S();
+ assert_eq!(foo.test::<8i32>(), 8);
+ assert_eq!(foo.test::<16i32>(), 16);
+}