[IronPython] Template argument type inference

Dino Viehland dinov at exchange.microsoft.com
Mon Feb 4 17:18:55 CET 2008


A bug on the error message would be great.  We haven't talked about inferring template arguments in a long time but it certainly does seem like it could be possible in some cases in the future.  If you want to file a feature request for it that'd be great too.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Curt Hagenlocher
Sent: Saturday, February 02, 2008 7:50 AM
To: Discussion of IronPython
Subject: [IronPython] Template argument type inference

Is it expected that the DLR and/or IronPython will eventually try to infer template arguments when calling a generically-defined functions?

PS F:\IPCE-r7\ipy2> .\ipy.exe
IronPython 2.0 Alpha (2.0.0.800) on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReferenceByPartialName('xunit')
>>> from Xunit import Assert
>>> Assert.Equal(1, 1)
Traceback (most recent call last):
  File , line unknown, in ##137
TypeError: Equal() takes at least 2147483647 arguments (2 given)
>>> Assert.Equal[type(1)](1, 1)
>>>

Should I file a CodePlex issue for that rather unintuitive error message?

--
Curt Hagenlocher
curt at hagenlocher.org<mailto:curt at hagenlocher.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080204/7b45bc36/attachment.html>


More information about the Ironpython-users mailing list