diff options
author | dotty-bot <felix.mulder@epfl.ch> | 2017-02-02 14:19:33 +0000 |
---|---|---|
committer | dotty-bot <felix.mulder@epfl.ch> | 2017-02-02 14:19:33 +0000 |
commit | 7ec0d89df9692ae1ed2b9c52fcf9c137985f503b (patch) | |
tree | c5197b4cceb447f6eb1a6446bac95f566654c2af /api/dotty/tools/dotc/typer/Dynamic.html | |
parent | abb6c717277fb7eb8635d94c32ecab5dee4dd903 (diff) | |
download | dotty-7ec0d89df9692ae1ed2b9c52fcf9c137985f503b.tar.gz dotty-7ec0d89df9692ae1ed2b9c52fcf9c137985f503b.tar.bz2 dotty-7ec0d89df9692ae1ed2b9c52fcf9c137985f503b.zip |
Update gh-pages site for d9b6f18569deda5aa2860156bef8dc2abcce3708
Diffstat (limited to 'api/dotty/tools/dotc/typer/Dynamic.html')
-rw-r--r-- | api/dotty/tools/dotc/typer/Dynamic.html | 78 |
1 files changed, 76 insertions, 2 deletions
diff --git a/api/dotty/tools/dotc/typer/Dynamic.html b/api/dotty/tools/dotc/typer/Dynamic.html index 2b47a8c75..916e3f070 100644 --- a/api/dotty/tools/dotc/typer/Dynamic.html +++ b/api/dotty/tools/dotc/typer/Dynamic.html @@ -5334,13 +5334,21 @@ <div id="entity-body" class="entity-section"> - <p>Translates selection that does not typecheck according to the scala.Dynamic rules: + <p>Handles programmable member selections of <code>Dynamic</code> instances and values +with structural types. Two functionalities:</p> +<ol> +<li>Translates selection that does not typecheck according to the scala.Dynamic rules: foo.bar(baz) = quux ~~> foo.selectDynamic(bar).update(baz, quux) foo.bar = baz ~~> foo.updateDynamic("bar")(baz) foo.bar(x = bazX, y = bazY, baz, ...) ~~> foo.applyDynamicNamed("bar")(("x", bazX), ("y", bazY), ("", baz), ...) foo.bar(baz0, baz1, ...) ~~> foo.applyDynamic(bar)(baz0, baz1, ...) -foo.bar ~~> foo.selectDynamic(bar)</p> +foo.bar ~~> foo.selectDynamic(bar)</li> +</ol> <p>The first matching rule of is applied.</p> +<ol> +<li>Translates member selections on structural types to calls of <code>selectDynamic</code> +or <code>selectDynamicMethod</code> on a <code>Selectable</code> instance. @See handleStructural.</li> +</ol> </div> @@ -5433,6 +5441,72 @@ foo.bar ~~> foo.selectDynamic(bar)</p> </div> </div><!-- end member --> + <div id="handleStructural(tree)(ctx)" class="member "> + <div class="member-title"> + <span class="member-annotations"> + + </span> + <span class="member-modifiers"> + + </span> + <span class="member-kind"> + def + </span> + <span class="member-name "> + + handleStructural + + </span> + + + + <span class="no-left">(</span> + + + <span class="no-left"> + tree: + </span> + <a href="../../../../.././api/dotty/tools/dotc/ast/Trees$/Instance.html#Tree">Tree</a> + + + <span class="no-left">)</span> + + <span class="no-left">(</span> + + <span class="no-left keyword">implicit</span> + + + <span class="no-left"> + ctx: + </span> + <a href="../../../../.././api/dotty/tools/dotc/core/Contexts$/Context.html">Context</a> + + + <span class="no-left">)</span> + + + + + + + <span class="no-left">: Tree</span> + + </div><!-- end member-title --> + + <div class="member-body"> + <p>Handle reflection-based dispatch for members of structural types. +Given <code>x.a</code>, where <code>x</code> is of (widened) type <code>T</code> and <code>x.a</code> is of type <code>U</code>:</p> +<p>If <code>U</code> is a value type,...</p> +<p>[U]</p> +<p></p> +<p>[(T1,...,Tn) => R]</p> +<p></p> +<p> +</p> + + </div> + </div><!-- end member --> + <div id="typedDynamicApply(tree,pt)(ctx)" class="member "> <div class="member-title"> <span class="member-annotations"> |