IronLanguages / main

Work for this repo has moved to https://github.com/IronLanguages/ironpython2
1.16k stars 347 forks source link

troubling scenario: old style class + cli interface as base types #649

Open ironpythonbot opened 9 years ago

ironpythonbot commented 9 years ago

This works in 1.1.

Old Style + CLI interface: how can I make u happy?

import System
class C:
...     def init(self, x): print x
...
class D(C, System.IComparable): pass
...
D()
Traceback (most recent call last):
File , line unknown, in ##18
TypeError: init() takes exactly 2 arguments (1 given)

D(1)
Traceback (most recent call last):
File , line unknown, in ##25
TypeError: default * new * does not take parameters

Old Style + CLI interface: again

import System
class C:
...     def f(self): pass
...
class D(C, System.IComparable): pass
...
'f' in dir(D)
Falsep1.1

Work Item Details

Original CodePlex Issue: Issue 23937 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 28, 2009 at 12:13 AM Reported by: dfugate Updated on: Feb 22, 2013 at 2:12 AM Updated by: jdhardy Custom value: Reported internally at Microsoft. CreatedDate: 1/24/2008 NewInternalID: 409759 OldInternalID: 370895 AreaPath: IronPython

Plaintext Attachments

CodePlex Issue #23937 Plain Text Attachments

ironpythonbot commented 9 years ago

On 2011-01-30 17:20:19 UTC, rjnienaber commented:

This scenario still exists in 2.6.2 and 2.7b1 on .NET Version: 4.0.30319.1: ipy26 testcase-23937.py

init() takes exactly 2 arguments (1 given) Traceback (most recent call last): File "C:\ipy\testcase-23937.py", line 12, in TypeError: object.new() takes no parameters ipy27 testcase-23937.py

init() takes exactly 2 arguments (1 given) Traceback (most recent call last): File "C:\ipy\testcase-23937.py", line 12, in TypeError: object.new() takes no parameters