diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-9188.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-9188.rs b/src/test/ui/issues/auxiliary/issue-9188.rs new file mode 100644 index 000000000..3bc5697a1 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-9188.rs @@ -0,0 +1,13 @@ +pub fn foo<T>() -> &'static isize { + if false { + static a: isize = 4; + return &a; + } else { + static a: isize = 5; + return &a; + } +} + +pub fn bar() -> &'static isize { + foo::<isize>() +} |