We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16b5fe3 commit 256a31aCopy full SHA for 256a31a
test/Constraints/weak.swift
@@ -0,0 +1,10 @@
1
+// RUN: %target-typecheck-verify-swift
2
+
3
+class C {}
4
+func overload(x: Int) -> C {}
5
+func overload(x: Float) -> C? {}
6
7
+// Ensure that we infer both weak vars as having a single level of
8
+// optionality. We will emit diagnostics if that is not the case.
9
+weak var v = overload(x: 1)
10
+weak var w = overload(x: 1.0)
0 commit comments