scala - How can I find the definition of methods/operations defined in an implicitly-converted class? -


i'm looking @ else's source code (scala), see operator :+= being called on variable of type indexedseq. looking on scaladocs page class figure out operator does, not see it. i'm thinking either it's defined in class outside of indexedseq's inheritance hierarchy, or else javascript on scaladocs page hiding somewhere can't see it. (actually it's neither; see answer below.)

i've hit every button on scaladocs page trying unhide everything. i've looked in web-page's html code. there has got way operator documentation of class can applied. hasn't there?

(n.b.: looked operator using symbolhound, know operator means now. question scala documentation in general, not particular operator.)

all operators in scala normal methods.

you cannot find because compiler magic re-assignement, not operator. or way: looks operator of own, "an operator followed = character".

the compiler magically turn assignment if operator (here :+) returns proper type, , original value var, obviously.

since not provided implicit nor explicit method on seq[t] or whatever, not appear anywhere in generated scaladoc.

so answer general question:

  • it language construct, place documented specification, sadly,
  • but, if find "<?>=" unknown operator somewhere, definition of "<?>", 1 sure documented.

edit: found defined in sls:

§6.12.4:

an assignment operator operator symbol (syntax category op in (§1.1)) ends in equals character “=”, exception of operators 1 of following conditions holds:

(1) operator starts equals character, or

(2) operator 1 of (<=), (>=), (!=).

it says later on happens when other options have been tried (including potential implicits).


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -