History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-33456
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Olga Lobacheva
Reporter: Olga Lobacheva
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

TypeParameter have to take into account its base types

Created: 14 Dec 06 19:48   Updated: 14 Dec 06 22:47
Component/s: None
Fix Version/s: 2.5.1
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Fixed in build: 327


 Description  « Hide
It's fine compiled code.

namespace Bug
{

public class BaseP
{
public static implicit operator int(BaseP p) { return 0; }
public static int operator +(BaseP p, BaseP p1) { return 0; }
public void F(){}
}

public class BaseP1: BaseP
{
public static implicit operator bool(BaseP1 p) { return true; }
public static bool operator +(BaseP1 p, string p1) { return true; }
}

public class Test<T, U> where T : BaseP, U
where U: BaseP1
{
public void G(BaseP t) { }
public void G1(int t) { }

public void F()

{ T t = default(T); t.F(); int x = t; bool y = t; int result = t + t; bool result1 = t + ""; }

}
}



 All   Comments   Work Log   Change History      Sort Order:
Olga Lobacheva - 14 Dec 06 19:57
May be it's time to refactor ResolveUtil.AddDeclarationsForProperDeclaredType method? Implement it not using MiscUtil.GetAllSuperSmth but in handy recursive way? Or it's not good for some reason?

Olga Lobacheva - 14 Dec 06 20:35
Hm, it seems that correct way is to put not only non static members to the table but all and then filter (situation about interface member via class with static members).
Or may be to put only static 'special' members (it is a little bit hack i think).

Anyway I think it's time to refactor AddDeclarations method.