JuliaLang/julia

Do something else when method name is a TypeVar

Open

#33.537 aperta il 11 ott 2019

Vedi su GitHub
 (7 commenti) (3 reazioni) (0 assegnatari)Julia (5773 fork)batch import
buggood first issue

Metriche repository

Star
 (48.709 star)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

I encountered the following behavior, which is just odd:

julia> T(a, b, c) where T = 1
T (generic function with 0 methods)

Apparently what happened was:

  1. It created a method T
  2. It added the defined method to something else (TypeVar, Any - one of them anyway)
  3. It returned the method T

According to @JeffBezanson this should do "something else, whatever it may be", so here's the issue for that.

Guida contributor