Skip to content

Instantly share code, notes, and snippets.

@fitomad
Created June 4, 2019 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/791bb8adb2887457184ddc2e82921ce1 to your computer and use it in GitHub Desktop.
Save fitomad/791bb8adb2887457184ddc2e82921ce1 to your computer and use it in GitHub Desktop.
let randomOne = AppleFactory.makeMac()
let randomTwo = AppleFactory.makePhone()
//
// Error al compilar.
// Aunque la función devuelva que son Equatables en realidad
// devuelve un `Mac` y un `iPhone`
if randomOne == randomTwo
{
print("Los random son iguales")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment