Skip to content

Instantly share code, notes, and snippets.

@fredrikekre
Last active April 26, 2016 11:08
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 fredrikekre/e80726d05d3aa6958093c2a7d293a7f5 to your computer and use it in GitHub Desktop.
Save fredrikekre/e80726d05d3aa6958093c2a7d293a7f5 to your computer and use it in GitHub Desktop.
abstract foo{T}
immutable bar{T}
x::T
end
immutable baz{T} <: foo{T <: Real}
x::bar{T}
end
x = 1.0; a = bar(x); b = baz(a)
x = complex(1.0); c = bar(x); d = baz(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment