Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6b9ec238a7
Fetching contributors…

Cannot retrieve contributors at this time

executable file 603 lines (448 sloc) 14.373 kb
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>#62966: Rakudo reports a type mismatch in assignment when typing an attribute with a role</title>
<link rel="shortcut icon" href="/rt3/NoAuth/images//favicon.png" type="image/png" />
<link rel="stylesheet" href="/rt3/NoAuth/css/rt.perl.org/main.css" type="text/css" media="all" />
<link rel="stylesheet" href="/rt3/NoAuth/css/print.css" type="text/css" media="print" />
<script type="text/javascript" src="/rt3/NoAuth/js/util.js"></script>
<script type="text/javascript" src="/rt3/NoAuth/js/titlebox-state.js"></script>
<script type="text/javascript"><!--
onLoadHook("loadTitleBoxStates()");
--></script>
</head>
<body id="comp-Public-Bug-Display">
<div id="logo">
<a href="http://rt.perl.org/rt3/"><img src="/rt3/NoAuth/images//local/pblogo.gif" alt="PerlBug" width="230" height="50"></a>
</div>
<div id="quickbar">
<div id="quick-personal">
<span class="hide"><a href="#skipnav">Skip Menu</a> | </span>
You are currently an anonymous guest.
|
<a href="/rt3/NoAuth/Logout.html?URL=/rt3/index.html?goto=%252FPublic%252FBug%252FDisplay.html%253Fid%253D62966">Login</a>
|
<a href="/rt3/NoAuth/Logout.html">Return to Main</a>
| <a href="/rt3/User/Prefs.html">Preferences</a>
</div>
<div id="topactions">
<span class="topaction">
<form action="/rt3/Public/Search/Simple.html">
<input size="12" name="q" autocomplete="off" accesskey="0" class="field" />
<input type="submit" class="button" value="Search" />
</form>
</span>
</div>
</div>
<div id="nav">
<ul id="system-menu">
<div><div class="wrapper">
</div></div>
</ul>
</div>
<div id="header">
<h1>#62966: Rakudo reports a type mismatch in assignment when typing an attribute with a role</h1>
<ul id="page-menu">
<div><div><div>
&nbsp;
</div></div></div>
</ul>
</div>
<div id="body">
<a name="skipnav" id="skipnav" accesskey="8"></a>
<div class="">
<div class="titlebox " id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html------Report information---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left">Report information</span>
<span class="right"></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html------Report information---0">
<table width="100%" class="ticket-summary">
<tr>
<td valign="top" width="50%" class="boxcontainer">
<div class="ticket-info-basics">
<div class="titlebox ticket-info-basics" id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html--ticket-info-basics----The Basics---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left"><a href="/rt3/Ticket/Modify.html?id=62966">The Basics</a></span>
<span class="right"></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html--ticket-info-basics----The Basics---0">
<table>
<tr>
<td class="label id">Id:</td>
<td class="value id">62966</td>
</tr>
<tr>
<td class="label status">Status:</td>
<td class="value status">resolved</td>
</tr>
<tr>
<td class="label time left">Left:</td>
<td class="value time left">0 min
</td>
</tr>
<tr>
<td class="label priority">Priority:</td>
<td class="value priority">0/0</td>
</tr>
<tr>
<td class="label queue">Queue:</td>
<td class="value queue">perl6
</td>
</tr>
</table>
<hr class="clear" />
</div>
</div>
</div>
<div class="ticket-info-people">
<div class="titlebox ticket-info-people" id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html--ticket-info-people----People---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left"><a href="/rt3/Ticket/ModifyPeople.html?id=62966">People</a></span>
<span class="right"></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html--ticket-info-people----People---0">
<table>
<tr>
<td class="label">Owner:</td>
<td class="value">
jnthn [at] jnthn.net
</td>
</tr>
<tr>
<td class="labeltop">Requestors:</td>
<td class="value">
masak
&lt;cmasak [at] gmail.com&gt;
<br />
</td>
</tr>
<tr>
<td class="labeltop">Cc:</td>
<td class="value">
</td>
</tr>
<tr>
<td class="labeltop">AdminCc:</td>
<td class="value">
</td>
</tr>
</table>
<hr class="clear" />
</div>
</div>
</div>
</td>
<td valign="top" width="50%" class="boxcontainer">
<div class="ticket-info-cfs">
<div class="titlebox ticket-info-cfs" id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html--ticket-info-cfs----Bug Information---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left"><a href="/rt3/Ticket/Modify.html?id=62966">Bug Information</a></span>
<span class="right"></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html--ticket-info-cfs----Bug Information---0">
<table>
<tr id="CF-18-ShowRow">
<td class="label">Severity:</td>
<td class="value">
<i>(no value)</i>
</td>
</tr>
<tr id="CF-19-ShowRow">
<td class="label">Tag:</td>
<td class="value">
<i>(no value)</i>
</td>
</tr>
<tr id="CF-20-ShowRow">
<td class="label">Platform:</td>
<td class="value">
<i>(no value)</i>
</td>
</tr>
<tr id="CF-21-ShowRow">
<td class="label">Patch Status:</td>
<td class="value">
<i>(no value)</i>
</td>
</tr>
</table>
<hr class="clear" />
</div>
</div>
</div>
<div class="ticket-info-links">
<div class="titlebox ticket-info-links" id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html--ticket-info-links----Links---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left"><a href="/rt3/Ticket/ModifyLinks.html?id=62966">Links</a></span>
<span class="right"></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html--ticket-info-links----Links---0">
<table>
<tr>
<td class="labeltop">Depends on:</td>
<td class="value">
<ul>
</ul>
</td>
</tr>
<tr>
<td class="labeltop">Depended on by:</td>
<td class="value">
<ul>
</ul>
</td>
</tr>
<tr>
<td class="labeltop">Parents:</td>
<td class="value">
<ul>
</ul>
</td>
</tr>
<tr>
<td class="labeltop">Children:</td>
<td class="value"></td>
</tr>
<tr>
<td class="labeltop">Refers to:</td>
<td class="value">
<ul>
</ul>
</td>
</tr>
<tr>
<td class="labeltop">Referred to by:</td>
<td class="value">
<ul>
</ul>
</td>
</tr>
</table>
<hr class="clear" />
</div>
</div>
</div>
</td>
</tr>
</table>
<hr class="clear" />
</div>
</div>
</div>
<br />
<div class="titlebox " id="">
<div class="titlebox-title">
<span class="widget"><a href="#" onclick="return rollup('TitleBox--_Public_Bug_Display.html------History---0');" onfocus="this.blur(); return false;" title="Toggle visibility">X</a></span>
<span class="left">History</span>
<span class="right"><span style="color: black">Display mode:</span> <span class="selected">Brief headers</span> &mdash; <a href="/rt3/Ticket/Display.html?ShowHeaders=1;id=62966">Full headers</a></span>
</div>
<div class="titlebox-content " id="TitleBox--_Public_Bug_Display.html------History---0">
<div id="ticket-history">
<div class="ticket-transaction message odd">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td rowspan="2" valign="top" class="type">
<a name="txn-527598" href="/rt3/Ticket/Display.html?id=62966#txn-527598">#</a>
&nbsp;
</td>
<td class="date">Sun&nbsp;Feb&nbsp;01&nbsp;02:19:22&nbsp;2009</td>
<td class="description">
masak - Ticket created
</td>
<td class="time-taken"></td>
<td class="actions">&nbsp;</td>
</tr>
<tr>
<td colspan="4" class="content">
<table>
<tr>
<td align="right" class="message-header-key">Subject:</td>
<td class="message-header-value">Rakudo reports a type mismatch in assignment when typing an attribute with a role</td>
</tr>
<tr>
<td align="right" class="message-header-key">Date:</td>
<td class="message-header-value">Sun, 1 Feb 2009 11:18:48 +0100</td>
</tr>
<tr>
<td align="right" class="message-header-key">To:</td>
<td class="message-header-value">rakudobug <!-- x --> at perl.org</td>
</tr>
<tr>
<td align="right" class="message-header-key">From:</td>
<td class="message-header-value">Carl Mäsak &lt;cmasak <!-- x --> at gmail.com&gt;</td>
</tr>
</table>
<div class="downloadattachment">
<a href="/rt3/Ticket/Attachment/527598/249548/">Download &#40;untitled&#41;</a>
<span class="downloadcontenttype">
[text/plain 226b]
</span>
</div>
<div class="messagebody">
<div class="message-stanza-depth-0">
With Rakudo 153a4a8 on Parrot r36239, I get the following:<br />
<br />
$ perl6 -e &#39;role A {}; class B { has A $!a }; B.new&#39;<br />
Type mismatch in assignment.<br />
[...]<br />
<br />
I see nothing wrong with the above, so I don&#39;t think the error is justified.<br />
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="ticket-transaction people even">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td rowspan="2" valign="top" class="type">
<a name="txn-540430" href="/rt3/Ticket/Display.html?id=62966#txn-540430">#</a>
&nbsp;
</td>
<td class="date">Thu&nbsp;Mar&nbsp;12&nbsp;10:01:14&nbsp;2009</td>
<td class="description">
pmichaud - Given to jnthn <!-- x --> at jnthn.net
</td>
<td class="time-taken"></td>
<td class="actions">&nbsp;</td>
</tr>
<tr>
<td colspan="4" class="content">
</td>
</tr>
</table>
</div>
<div class="ticket-transaction message odd">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td rowspan="2" valign="top" class="type">
<a name="txn-540606" href="/rt3/Ticket/Display.html?id=62966#txn-540606">#</a>
&nbsp;
</td>
<td class="date">Fri&nbsp;Mar&nbsp;13&nbsp;05:09:25&nbsp;2009</td>
<td class="description">
jnthn <!-- x --> at jnthn.net - Correspondence added
</td>
<td class="time-taken"></td>
<td class="actions">&nbsp;</td>
</tr>
<tr>
<td colspan="4" class="content">
<table>
<tr>
<td align="right" class="message-header-key">RT-Send-CC:</td>
<td class="message-header-value">perl6-compiler <!-- x --> at perl.org</td>
</tr>
</table>
<div class="downloadattachment">
<a href="/rt3/Ticket/Attachment/540606/256560/">Download &#40;untitled&#41;</a>
<span class="downloadcontenttype">
[text/plain 469b]
</span>
</div>
<div class="messagebody">
<div class="message-stanza-depth-0">
On Sun Feb 01 02:19:22 2009, masak wrote:<br />
<div class="message-stanza-depth-1">
&gt; With Rakudo 153a4a8 on Parrot r36239, I get the following:<br />
&gt; <br />
&gt; $ perl6 -e &#39;role A {}; class B { has A $!a }; B.new&#39;<br />
&gt; Type mismatch in assignment.<br />
&gt; [...]<br />
&gt; <br />
&gt; I see nothing wrong with the above, so I don&#39;t think the error is <br />
&gt; justified.<br />
</div>
<br />
Aye, there were a range of quirks/issues in role type checking, which<br />
I&#39;ve now fixed in git 88b6c25. Plus added some tests for roles being<br />
used as type constraints.<br />
<br />
Thanks,<br />
<br />
Jonathan<br />
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="ticket-transaction basics even">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td rowspan="2" valign="top" class="type">
<a name="txn-540610" href="/rt3/Ticket/Display.html?id=62966#txn-540610">#</a>
&nbsp;
</td>
<td class="date">Fri&nbsp;Mar&nbsp;13&nbsp;05:09:26&nbsp;2009</td>
<td class="description">
RT_System - Status changed from &#39;new&#39; to &#39;open&#39;
</td>
<td class="time-taken"></td>
<td class="actions">&nbsp;</td>
</tr>
<tr>
<td colspan="4" class="content">
</td>
</tr>
</table>
</div>
<div class="ticket-transaction basics odd">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td rowspan="2" valign="top" class="type">
<a name="txn-540614" href="/rt3/Ticket/Display.html?id=62966#txn-540614">#</a>
&nbsp;
</td>
<td class="date">Fri&nbsp;Mar&nbsp;13&nbsp;05:09:26&nbsp;2009</td>
<td class="description">
jnthn <!-- x --> at jnthn.net - Status changed from &#39;open&#39; to &#39;resolved&#39;
</td>
<td class="time-taken"></td>
<td class="actions">&nbsp;</td>
</tr>
<tr>
<td colspan="4" class="content">
</td>
</tr>
</table>
</div>
</div>
<hr class="clear" />
</div>
</div>
</div>
<hr size=0>
<div>
For issues related to this RT instance (aka "perlbug"), please contact <tt>perlbug-admin at perl.org</tt>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-50555-18");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<div id="footer">
<p id="time">
<span>Time to display: 0.858387</span>
</p>
<p id="bpscredits">
<span>
&#187;&#124;&#171; RT 3.6.HEAD Copyright 1996-2006 <a href="http://www.bestpractical.com?rt=3.6.HEAD">Best Practical Solutions, LLC</a>.
</span>
</p>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.