<div dir="ltr"><div><div>I have a type like <br><br><span style="font-family:monospace,monospace">struct DistortedNoise&lt;Source, Displacement&gt; where Source:Noise, Displacement:Noise<br>{<br>    let source:Source,<br>        displacement:Displacement<br><br>    init(source:Source, displacement:Displacement)<br>    {<br>        self.source       = source<br>        self.displacement = displacement<br>    }<br><br>    init(source:Source)<br>    {<br>        self.source       = source<br>        self.displacement = source<br>    }<br>}</span><br><br></div>and I get the error <br><span style="font-family:monospace,monospace"><br>Compile Swift Module &#39;Noise&#39; (5 sources)<br>/home/taylor/noise/sources/noise/noise.swift:576:29: error: &#39;Source&#39; is not convertible to &#39;Displacement&#39;<br>        self.displacement = source<br>                            ^~~~~~</span><br><br></div>How do I tell Swift that I want the same type fulfilling both <span style="font-family:monospace,monospace">Source</span> and <span style="font-family:monospace,monospace">Displacement</span>?<br><div><br></div></div>