diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-29 02:25:10 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-29 02:25:10 -0700 |
commit | 4945e77a58f3ab10069461e86e5e10c06e91e489 (patch) | |
tree | 2d5cb5200b34ec540f9916578e002c0e3cdb07ea /html/054static_dispatch.cc.html | |
parent | 284e5576495a946d60603b026bb5e27de356b9fd (diff) | |
download | mu-4945e77a58f3ab10069461e86e5e10c06e91e489.tar.gz |
3895
Diffstat (limited to 'html/054static_dispatch.cc.html')
-rw-r--r-- | html/054static_dispatch.cc.html | 233 |
1 files changed, 117 insertions, 116 deletions
diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html index 458f1e9c..52d549fe 100644 --- a/html/054static_dispatch.cc.html +++ b/html/054static_dispatch.cc.html @@ -274,7 +274,7 @@ if ('onhashchange' in window) { <span id="L209" class="LineNr">209 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller_recipe<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"failed to find a matching call for '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L210" class="LineNr">210 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">" available variants are:</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L211" class="LineNr">211 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>variants<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L212" class="LineNr">212 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">" "</span> << <a href='054static_dispatch.cc.html#L584'>original_header_label</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variants<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L212" class="LineNr">212 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">" "</span> << <a href='054static_dispatch.cc.html#L585'>original_header_label</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variants<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L213" class="LineNr">213 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L214" class="LineNr">214 </span> <span class="Conceal">¦</span> <span class="Normal">for</span> <span class="Delimiter">(</span>list<call>::iterator p = <span class="Comment">/*</span><span class="Comment">skip</span><span class="Comment">*/</span>++Resolve_stack<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Resolve_stack<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L215" class="LineNr">215 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">const</span> recipe& specializer_recipe = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> p<span class="Delimiter">-></span>running_recipe<span class="Delimiter">);</span> @@ -631,124 +631,125 @@ if ('onhashchange' in window) { <span id="L566" class="LineNr">566 </span><span class="Comment"># number variant is preferred</span> <span id="L567" class="LineNr">567 </span><span class="traceContains">+mem: storing 35 in location 1</span> <span id="L568" class="LineNr">568 </span> -<span id="L569" class="LineNr">569 </span><span class="Delimiter">:(code)</span> +<span id="L569" class="LineNr">569 </span><span class="Delimiter">:(replace{} "string header_label(const <a href='010vm.cc.html#L14'>recipe_ordinal</a> r)")</span> <span id="L570" class="LineNr">570 </span>string header_label<span class="Delimiter">(</span><span class="Normal">const</span> <a href='010vm.cc.html#L14'>recipe_ordinal</a> r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L571" class="LineNr">571 </span> <span class="Identifier">return</span> header_label<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">));</span> <span id="L572" class="LineNr">572 </span><span class="Delimiter">}</span> -<span id="L573" class="LineNr">573 </span>string header_label<span class="Delimiter">(</span><span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L574" class="LineNr">574 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L575" class="LineNr">575 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>name<span class="Delimiter">;</span> -<span id="L576" class="LineNr">576 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L577" class="LineNr">577 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> -<span id="L578" class="LineNr">578 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> out << <span class="Constant">" ->"</span><span class="Delimiter">;</span> -<span id="L579" class="LineNr">579 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L580" class="LineNr">580 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> -<span id="L581" class="LineNr">581 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> -<span id="L582" class="LineNr">582 </span><span class="Delimiter">}</span> -<span id="L583" class="LineNr">583 </span> -<span id="L584" class="LineNr">584 </span>string <a href='054static_dispatch.cc.html#L584'>original_header_label</a><span class="Delimiter">(</span><span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L585" class="LineNr">585 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L586" class="LineNr">586 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>original_name<span class="Delimiter">;</span> -<span id="L587" class="LineNr">587 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L588" class="LineNr">588 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>original_string<span class="Delimiter">;</span> -<span id="L589" class="LineNr">589 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> out << <span class="Constant">" ->"</span><span class="Delimiter">;</span> -<span id="L590" class="LineNr">590 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> -<span id="L591" class="LineNr">591 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>original_string<span class="Delimiter">;</span> -<span id="L592" class="LineNr">592 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> -<span id="L593" class="LineNr">593 </span><span class="Delimiter">}</span> -<span id="L594" class="LineNr">594 </span> -<span id="L595" class="LineNr">595 </span><span class="Delimiter">:(scenario reload_variant_retains_other_variants)</span> -<span id="L596" class="LineNr">596 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L597" class="LineNr">597 </span> <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">34</span> -<span id="L598" class="LineNr">598 </span> <span class="Constant">2</span>:num<span class="Special"> <- </span>foo <span class="Constant">1</span>:num -<span id="L599" class="LineNr">599 </span>] -<span id="L600" class="LineNr">600 </span><span class="muRecipe">def</span> foo x:num<span class="muRecipe"> -> </span>y:num [ -<span id="L601" class="LineNr">601 </span> local-scope -<span id="L602" class="LineNr">602 </span> load-ingredients -<span id="L603" class="LineNr">603 </span> <span class="Identifier">return</span> <span class="Constant">34</span> -<span id="L604" class="LineNr">604 </span>] -<span id="L605" class="LineNr">605 </span><span class="muRecipe">def</span> foo x:&:num<span class="muRecipe"> -> </span>y:num [ -<span id="L606" class="LineNr">606 </span> local-scope -<span id="L607" class="LineNr">607 </span> load-ingredients -<span id="L608" class="LineNr">608 </span> <span class="Identifier">return</span> <span class="Constant">35</span> -<span id="L609" class="LineNr">609 </span>] -<span id="L610" class="LineNr">610 </span><span class="muRecipe">def</span>! foo x:&:num<span class="muRecipe"> -> </span>y:num [ -<span id="L611" class="LineNr">611 </span> local-scope -<span id="L612" class="LineNr">612 </span> load-ingredients -<span id="L613" class="LineNr">613 </span> <span class="Identifier">return</span> <span class="Constant">36</span> -<span id="L614" class="LineNr">614 </span>] -<span id="L615" class="LineNr">615 </span><span class="traceContains">+mem: storing 34 in location 2</span> -<span id="L616" class="LineNr">616 </span>$error: <span class="Constant">0</span> -<span id="L617" class="LineNr">617 </span> -<span id="L618" class="LineNr">618 </span><span class="Delimiter">:(scenario dispatch_errors_come_after_unknown_name_errors)</span> -<span id="L619" class="LineNr">619 </span><span class="Special">% Hide_errors = true;</span> -<span id="L620" class="LineNr">620 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L621" class="LineNr">621 </span> <span class="Normal">y</span>:num<span class="Special"> <- </span>foo x -<span id="L622" class="LineNr">622 </span>] -<span id="L623" class="LineNr">623 </span><span class="muRecipe">def</span> foo a:num<span class="muRecipe"> -> </span>b:num [ -<span id="L624" class="LineNr">624 </span> local-scope -<span id="L625" class="LineNr">625 </span> load-ingredients -<span id="L626" class="LineNr">626 </span> <span class="Identifier">return</span> <span class="Constant">34</span> -<span id="L627" class="LineNr">627 </span>] -<span id="L628" class="LineNr">628 </span><span class="muRecipe">def</span> foo a:<span class="Normal">bool</span><span class="muRecipe"> -> </span>b:num [ -<span id="L629" class="LineNr">629 </span> local-scope -<span id="L630" class="LineNr">630 </span> load-ingredients -<span id="L631" class="LineNr">631 </span> <span class="Identifier">return</span> <span class="Constant">35</span> -<span id="L632" class="LineNr">632 </span>] -<span id="L633" class="LineNr">633 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: missing type for 'x' in 'y:num <- foo x'</span> -<span id="L634" class="LineNr">634 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: failed to find a matching call for 'y:num <- foo x'</span> -<span id="L635" class="LineNr">635 </span> -<span id="L636" class="LineNr">636 </span><span class="Delimiter">:(scenario override_methods_with_type_abbreviations)</span> -<span id="L637" class="LineNr">637 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L638" class="LineNr">638 </span> local-scope -<span id="L639" class="LineNr">639 </span> <span class="Normal">s</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [abc] -<span id="L640" class="LineNr">640 </span> <span class="Constant">1</span>:num/<span class="Special">raw <- </span>foo s -<span id="L641" class="LineNr">641 </span>] -<span id="L642" class="LineNr">642 </span><span class="muRecipe">def</span> foo a:<a href='043space.cc.html#L76'>address</a>:array:character<span class="muRecipe"> -> </span>result:number [ -<span id="L643" class="LineNr">643 </span> <span class="Identifier">return</span> <span class="Constant">34</span> -<span id="L644" class="LineNr">644 </span>] -<span id="L645" class="LineNr">645 </span><span class="Comment"># identical to previous variant once you take type abbreviations into account</span> -<span id="L646" class="LineNr">646 </span><span class="muRecipe">def</span>! foo a:text<span class="muRecipe"> -> </span>result:num [ -<span id="L647" class="LineNr">647 </span> <span class="Identifier">return</span> <span class="Constant">35</span> -<span id="L648" class="LineNr">648 </span>] -<span id="L649" class="LineNr">649 </span><span class="traceContains">+mem: storing 35 in location 1</span> -<span id="L650" class="LineNr">650 </span> -<span id="L651" class="LineNr">651 </span><span class="Delimiter">:(scenario ignore_static_dispatch_in_type_errors_without_overloading)</span> -<span id="L652" class="LineNr">652 </span><span class="Special">% Hide_errors = true;</span> -<span id="L653" class="LineNr">653 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L654" class="LineNr">654 </span> local-scope -<span id="L655" class="LineNr">655 </span> <span class="Normal">x</span>:&:num<span class="Special"> <- </span>copy <span class="Constant">0</span> -<span id="L656" class="LineNr">656 </span> foo x -<span id="L657" class="LineNr">657 </span>] -<span id="L658" class="LineNr">658 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">char</span> [ -<span id="L659" class="LineNr">659 </span> local-scope -<span id="L660" class="LineNr">660 </span> load-ingredients -<span id="L661" class="LineNr">661 </span>] -<span id="L662" class="LineNr">662 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: types don't match in call for 'foo x'</span> -<span id="L663" class="LineNr">663 </span><span class="traceContains">+error: which tries to call 'recipe foo x:&:char'</span> -<span id="L664" class="LineNr">664 </span> -<span id="L665" class="LineNr">665 </span><span class="Delimiter">:(scenario show_available_variants_in_dispatch_errors)</span> -<span id="L666" class="LineNr">666 </span><span class="Special">% Hide_errors = true;</span> -<span id="L667" class="LineNr">667 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ -<span id="L668" class="LineNr">668 </span> local-scope -<span id="L669" class="LineNr">669 </span> <span class="Normal">x</span>:&:num<span class="Special"> <- </span>copy <span class="Constant">0</span> -<span id="L670" class="LineNr">670 </span> foo x -<span id="L671" class="LineNr">671 </span>] -<span id="L672" class="LineNr">672 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">char</span> [ -<span id="L673" class="LineNr">673 </span> local-scope -<span id="L674" class="LineNr">674 </span> load-ingredients -<span id="L675" class="LineNr">675 </span>] -<span id="L676" class="LineNr">676 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">bool</span> [ -<span id="L677" class="LineNr">677 </span> local-scope -<span id="L678" class="LineNr">678 </span> load-ingredients -<span id="L679" class="LineNr">679 </span>] -<span id="L680" class="LineNr">680 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: failed to find a matching call for 'foo x'</span> -<span id="L681" class="LineNr">681 </span><span class="traceContains">+error: available variants are:</span> -<span id="L682" class="LineNr">682 </span><span class="traceContains">+error: <a href='010vm.cc.html#L19'>recipe</a> foo x:&:char</span> -<span id="L683" class="LineNr">683 </span><span class="traceContains">+error: <a href='010vm.cc.html#L19'>recipe</a> foo x:&:bool</span> -<span id="L684" class="LineNr">684 </span> -<span id="L685" class="LineNr">685 </span><span class="Delimiter">:(before "End Includes")</span> -<span id="L686" class="LineNr">686 </span><span class="Normal">using</span> std::abs<span class="Delimiter">;</span> +<span id="L573" class="LineNr">573 </span><span class="Delimiter">:(code)</span> +<span id="L574" class="LineNr">574 </span>string header_label<span class="Delimiter">(</span><span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L575" class="LineNr">575 </span> ostringstream out<span class="Delimiter">;</span> +<span id="L576" class="LineNr">576 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>name<span class="Delimiter">;</span> +<span id="L577" class="LineNr">577 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> +<span id="L578" class="LineNr">578 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> +<span id="L579" class="LineNr">579 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> out << <span class="Constant">" ->"</span><span class="Delimiter">;</span> +<span id="L580" class="LineNr">580 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> +<span id="L581" class="LineNr">581 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> +<span id="L582" class="LineNr">582 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> +<span id="L583" class="LineNr">583 </span><span class="Delimiter">}</span> +<span id="L584" class="LineNr">584 </span> +<span id="L585" class="LineNr">585 </span>string <a href='054static_dispatch.cc.html#L585'>original_header_label</a><span class="Delimiter">(</span><span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L586" class="LineNr">586 </span> ostringstream out<span class="Delimiter">;</span> +<span id="L587" class="LineNr">587 </span> out << <span class="Constant">"recipe "</span> << caller<span class="Delimiter">.</span>original_name<span class="Delimiter">;</span> +<span id="L588" class="LineNr">588 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> +<span id="L589" class="LineNr">589 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << caller<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>original_string<span class="Delimiter">;</span> +<span id="L590" class="LineNr">590 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> out << <span class="Constant">" ->"</span><span class="Delimiter">;</span> +<span id="L591" class="LineNr">591 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> +<span id="L592" class="LineNr">592 </span> <span class="Conceal">¦</span> out << <span class="Constant">' '</span> << caller<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>original_string<span class="Delimiter">;</span> +<span id="L593" class="LineNr">593 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> +<span id="L594" class="LineNr">594 </span><span class="Delimiter">}</span> +<span id="L595" class="LineNr">595 </span> +<span id="L596" class="LineNr">596 </span><span class="Delimiter">:(scenario reload_variant_retains_other_variants)</span> +<span id="L597" class="LineNr">597 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ +<span id="L598" class="LineNr">598 </span> <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">34</span> +<span id="L599" class="LineNr">599 </span> <span class="Constant">2</span>:num<span class="Special"> <- </span>foo <span class="Constant">1</span>:num +<span id="L600" class="LineNr">600 </span>] +<span id="L601" class="LineNr">601 </span><span class="muRecipe">def</span> foo x:num<span class="muRecipe"> -> </span>y:num [ +<span id="L602" class="LineNr">602 </span> local-scope +<span id="L603" class="LineNr">603 </span> load-ingredients +<span id="L604" class="LineNr">604 </span> <span class="Identifier">return</span> <span class="Constant">34</span> +<span id="L605" class="LineNr">605 </span>] +<span id="L606" class="LineNr">606 </span><span class="muRecipe">def</span> foo x:&:num<span class="muRecipe"> -> </span>y:num [ +<span id="L607" class="LineNr">607 </span> local-scope +<span id="L608" class="LineNr">608 </span> load-ingredients +<span id="L609" class="LineNr">609 </span> <span class="Identifier">return</span> <span class="Constant">35</span> +<span id="L610" class="LineNr">610 </span>] +<span id="L611" class="LineNr">611 </span><span class="muRecipe">def</span>! foo x:&:num<span class="muRecipe"> -> </span>y:num [ +<span id="L612" class="LineNr">612 </span> local-scope +<span id="L613" class="LineNr">613 </span> load-ingredients +<span id="L614" class="LineNr">614 </span> <span class="Identifier">return</span> <span class="Constant">36</span> +<span id="L615" class="LineNr">615 </span>] +<span id="L616" class="LineNr">616 </span><span class="traceContains">+mem: storing 34 in location 2</span> +<span id="L617" class="LineNr">617 </span>$error: <span class="Constant">0</span> +<span id="L618" class="LineNr">618 </span> +<span id="L619" class="LineNr">619 </span><span class="Delimiter">:(scenario dispatch_errors_come_after_unknown_name_errors)</span> +<span id="L620" class="LineNr">620 </span><span class="Special">% Hide_errors = true;</span> +<span id="L621" class="LineNr">621 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ +<span id="L622" class="LineNr">622 </span> <span class="Normal">y</span>:num<span class="Special"> <- </span>foo x +<span id="L623" class="LineNr">623 </span>] +<span id="L624" class="LineNr">624 </span><span class="muRecipe">def</span> foo a:num<span class="muRecipe"> -> </span>b:num [ +<span id="L625" class="LineNr">625 </span> local-scope +<span id="L626" class="LineNr">626 </span> load-ingredients +<span id="L627" class="LineNr">627 </span> <span class="Identifier">return</span> <span class="Constant">34</span> +<span id="L628" class="LineNr">628 </span>] +<span id="L629" class="LineNr">629 </span><span class="muRecipe">def</span> foo a:<span class="Normal">bool</span><span class="muRecipe"> -> </span>b:num [ +<span id="L630" class="LineNr">630 </span> local-scope +<span id="L631" class="LineNr">631 </span> load-ingredients +<span id="L632" class="LineNr">632 </span> <span class="Identifier">return</span> <span class="Constant">35</span> +<span id="L633" class="LineNr">633 </span>] +<span id="L634" class="LineNr">634 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: missing type for 'x' in 'y:num <- foo x'</span> +<span id="L635" class="LineNr">635 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: failed to find a matching call for 'y:num <- foo x'</span> +<span id="L636" class="LineNr">636 </span> +<span id="L637" class="LineNr">637 </span><span class="Delimiter">:(scenario override_methods_with_type_abbreviations)</span> +<span id="L638" class="LineNr">638 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ +<span id="L639" class="LineNr">639 </span> local-scope +<span id="L640" class="LineNr">640 </span> <span class="Normal">s</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [abc] +<span id="L641" class="LineNr">641 </span> <span class="Constant">1</span>:num/<span class="Special">raw <- </span>foo s +<span id="L642" class="LineNr">642 </span>] +<span id="L643" class="LineNr">643 </span><span class="muRecipe">def</span> foo a:<a href='043space.cc.html#L76'>address</a>:array:character<span class="muRecipe"> -> </span>result:number [ +<span id="L644" class="LineNr">644 </span> <span class="Identifier">return</span> <span class="Constant">34</span> +<span id="L645" class="LineNr">645 </span>] +<span id="L646" class="LineNr">646 </span><span class="Comment"># identical to previous variant once you take type abbreviations into account</span> +<span id="L647" class="LineNr">647 </span><span class="muRecipe">def</span>! foo a:text<span class="muRecipe"> -> </span>result:num [ +<span id="L648" class="LineNr">648 </span> <span class="Identifier">return</span> <span class="Constant">35</span> +<span id="L649" class="LineNr">649 </span>] +<span id="L650" class="LineNr">650 </span><span class="traceContains">+mem: storing 35 in location 1</span> +<span id="L651" class="LineNr">651 </span> +<span id="L652" class="LineNr">652 </span><span class="Delimiter">:(scenario ignore_static_dispatch_in_type_errors_without_overloading)</span> +<span id="L653" class="LineNr">653 </span><span class="Special">% Hide_errors = true;</span> +<span id="L654" class="LineNr">654 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ +<span id="L655" class="LineNr">655 </span> local-scope +<span id="L656" class="LineNr">656 </span> <span class="Normal">x</span>:&:num<span class="Special"> <- </span>copy <span class="Constant">0</span> +<span id="L657" class="LineNr">657 </span> foo x +<span id="L658" class="LineNr">658 </span>] +<span id="L659" class="LineNr">659 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">char</span> [ +<span id="L660" class="LineNr">660 </span> local-scope +<span id="L661" class="LineNr">661 </span> load-ingredients +<span id="L662" class="LineNr">662 </span>] +<span id="L663" class="LineNr">663 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: types don't match in call for 'foo x'</span> +<span id="L664" class="LineNr">664 </span><span class="traceContains">+error: which tries to call 'recipe foo x:&:char'</span> +<span id="L665" class="LineNr">665 </span> +<span id="L666" class="LineNr">666 </span><span class="Delimiter">:(scenario show_available_variants_in_dispatch_errors)</span> +<span id="L667" class="LineNr">667 </span><span class="Special">% Hide_errors = true;</span> +<span id="L668" class="LineNr">668 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ +<span id="L669" class="LineNr">669 </span> local-scope +<span id="L670" class="LineNr">670 </span> <span class="Normal">x</span>:&:num<span class="Special"> <- </span>copy <span class="Constant">0</span> +<span id="L671" class="LineNr">671 </span> foo x +<span id="L672" class="LineNr">672 </span>] +<span id="L673" class="LineNr">673 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">char</span> [ +<span id="L674" class="LineNr">674 </span> local-scope +<span id="L675" class="LineNr">675 </span> load-ingredients +<span id="L676" class="LineNr">676 </span>] +<span id="L677" class="LineNr">677 </span><span class="muRecipe">def</span> foo x:&:<span class="Normal">bool</span> [ +<span id="L678" class="LineNr">678 </span> local-scope +<span id="L679" class="LineNr">679 </span> load-ingredients +<span id="L680" class="LineNr">680 </span>] +<span id="L681" class="LineNr">681 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: failed to find a matching call for 'foo x'</span> +<span id="L682" class="LineNr">682 </span><span class="traceContains">+error: available variants are:</span> +<span id="L683" class="LineNr">683 </span><span class="traceContains">+error: <a href='010vm.cc.html#L19'>recipe</a> foo x:&:char</span> +<span id="L684" class="LineNr">684 </span><span class="traceContains">+error: <a href='010vm.cc.html#L19'>recipe</a> foo x:&:bool</span> +<span id="L685" class="LineNr">685 </span> +<span id="L686" class="LineNr">686 </span><span class="Delimiter">:(before "End Includes")</span> +<span id="L687" class="LineNr">687 </span><span class="Normal">using</span> std::abs<span class="Delimiter">;</span> </pre> </body> </html> |