diff options
Diffstat (limited to 'api/dotty/tools/dotc/typer')
-rw-r--r-- | api/dotty/tools/dotc/typer/Dynamic.html | 78 | ||||
-rw-r--r-- | api/dotty/tools/dotc/typer/Inliner.html | 4 | ||||
-rw-r--r-- | api/dotty/tools/dotc/typer/Namer/ClassCompleter.html | 8 | ||||
-rw-r--r-- | api/dotty/tools/dotc/typer/TypeAssigner.html | 65 | ||||
-rw-r--r-- | api/dotty/tools/dotc/typer/index.html | 16 |
5 files changed, 159 insertions, 12 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"> diff --git a/api/dotty/tools/dotc/typer/Inliner.html b/api/dotty/tools/dotc/typer/Inliner.html index 9efc5fcd1..ae85a2bb0 100644 --- a/api/dotty/tools/dotc/typer/Inliner.html +++ b/api/dotty/tools/dotc/typer/Inliner.html @@ -5407,7 +5407,7 @@ </div> </div><!-- end member --> - <div id="$875$" class="member private"> + <div id="$65$" class="member private"> <div class="member-title"> <span class="member-annotations"> @@ -5420,7 +5420,7 @@ </span> <span class="member-name "> - $875$ + $65$ </span> diff --git a/api/dotty/tools/dotc/typer/Namer/ClassCompleter.html b/api/dotty/tools/dotc/typer/Namer/ClassCompleter.html index 967bfe1af..b808c86ab 100644 --- a/api/dotty/tools/dotc/typer/Namer/ClassCompleter.html +++ b/api/dotty/tools/dotc/typer/Namer/ClassCompleter.html @@ -5338,7 +5338,7 @@ <div id="entity-members" class="entity-section "> - <div id="$632$" class="member "> + <div id="$70$" class="member "> <div class="member-title"> <span class="member-annotations"> @@ -5351,7 +5351,7 @@ </span> <span class="member-name "> - $632$ + $70$ </span> @@ -5369,7 +5369,7 @@ </div> </div><!-- end member --> - <div id="$633$" class="member "> + <div id="$71$" class="member "> <div class="member-title"> <span class="member-annotations"> @@ -5382,7 +5382,7 @@ </span> <span class="member-name "> - $633$ + $71$ </span> diff --git a/api/dotty/tools/dotc/typer/TypeAssigner.html b/api/dotty/tools/dotc/typer/TypeAssigner.html index f74ca156a..011dfd158 100644 --- a/api/dotty/tools/dotc/typer/TypeAssigner.html +++ b/api/dotty/tools/dotc/typer/TypeAssigner.html @@ -8114,6 +8114,71 @@ if this is not possible, replace the ClassInfo as above.</li> </div> </div><!-- end member --> + <div id="avoidPrivateLeaks(sym,pos)(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 "> + + avoidPrivateLeaks + + </span> + + + + <span class="no-left">(</span> + + + <span class="no-left"> + sym: + </span> + <a href="../../../../.././api/dotty/tools/dotc/core/Symbols$/Symbol.html">Symbol</a> + + <span class="no-left">, </span> + + + <span class=""> + pos: + </span> + Position + + + <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">: Type</span> + + </div><!-- end member-title --> + + <div class="member-body"> + + </div> + </div><!-- end member --> + <div id="avoidingType(expr,bindings)(ctx)" class="member "> <div class="member-title"> <span class="member-annotations"> diff --git a/api/dotty/tools/dotc/typer/index.html b/api/dotty/tools/dotc/typer/index.html index f5dc8c2d1..9272cf8dd 100644 --- a/api/dotty/tools/dotc/typer/index.html +++ b/api/dotty/tools/dotc/typer/index.html @@ -5566,10 +5566,18 @@ </div><!-- end member-title --> <div class="member-body"> - <p>Translates selection that does not typecheck according to the scala.Dynamic rules: -foo.bar(baz) = quux ~~> foo.selectDynamic(bar).upd... -</p> -<p></p> + <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)</li> +</ol> +<p>The first matching rule of is appli...</p> +<ol></ol> </div> </div><!-- end member --> |