diff options
author | dotty-bot <felix.mulder@epfl.ch> | 2017-04-04 19:30:26 +0000 |
---|---|---|
committer | dotty-bot <felix.mulder@epfl.ch> | 2017-04-04 19:30:26 +0000 |
commit | 18e3e86ce769b6823988769953914bac28f9589a (patch) | |
tree | d9cc0d07b1546fc5529222d86b7e98a8fd0c59c6 /api/dotty/tools/dotc/typer | |
parent | b25889b36dc433a0159e3c457c050bbeaa81fc5b (diff) | |
download | dotty-18e3e86ce769b6823988769953914bac28f9589a.tar.gz dotty-18e3e86ce769b6823988769953914bac28f9589a.tar.bz2 dotty-18e3e86ce769b6823988769953914bac28f9589a.zip |
Update gh-pages site for 34afd70f55b2d6245b4840ea42fb4ca1845ee649
Diffstat (limited to 'api/dotty/tools/dotc/typer')
-rw-r--r-- | api/dotty/tools/dotc/typer/Checking$.html | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/api/dotty/tools/dotc/typer/Checking$.html b/api/dotty/tools/dotc/typer/Checking$.html index f5fb63bdd..4df27d809 100644 --- a/api/dotty/tools/dotc/typer/Checking$.html +++ b/api/dotty/tools/dotc/typer/Checking$.html @@ -6011,16 +6011,29 @@ and that the instance conforms to the self type of the created class.</p> <div class="member-body-short" id="short-body-checkNoPrivateLeaks(sym,pos)(ctx)"> <p>Check the type signature of the symbol <code>M</code> defined by <code>tree</code> does not refer to a private type or value which is invisible at a point where <code>M</code> is still -visibl... +visibl...</p> +<p> +</p> +<p> </p> </div> <div class="member-body-long" id ="long-body-checkNoPrivateLeaks(sym,pos)(ctx)"> <p>Check the type signature of the symbol <code>M</code> defined by <code>tree</code> does not refer to a private type or value which is invisible at a point where <code>M</code> is still -visible. As an exception, we allow references to type aliases if the underlying -type of the alias is not a leak. So type aliases are transparent as far as -leak testing is concerned.</p> +visible.</p> +<p>As an exception, we allow references to type aliases if the underlying +type of the alias is not a leak, and if <code>sym</code> is not a type. The rationale +for this is that the inferred type of a term symbol might contain leaky +aliases which should be removed (see leak-inferred.scala for an example), +but a type symbol definition will not contain leaky aliases unless the +user wrote them, so we can ask the user to change his definition. The more +practical reason for not transforming types is that <code>checkNoPrivateLeaks</code> +can force a lot of denotations, and this restriction means that we never +need to run <code>TypeAssigner#avoidPrivateLeaks</code> on type symbols when +unpickling, which avoids some issues related to forcing order.</p> +<p>See i997.scala for negative tests, and i1130.scala for a case where it +matters that we transform leaky aliases away.</p> </div> </div> |