Project
ReSharper
Priority
Show-stopper
Type
Bug
Fix versions
2.5
State
Fixed
Assignee
Evgeny Pasynkov
Subsystem
Code Analysis
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Vladimir Reshetnikov
    5 years ago (05 Oct 2006 13:14)
  • Updated by   Vladimir Reshetnikov
    5 years ago (18 Oct 2006 16:34)
  • Jira: RSRP-29382
    (history, comments)
 
RSRP-29382 VS2005 crashes
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
I have the following code (experimental, just to test some ReSharper's features):

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;

class Stuff<T>
{}

public class Foo
{
    public static void Throw<TException, UException>() 
        where TException : UException, new()
        where UException : TException
    {
        try
        {
            throw new TException();
        }
        catch(System.Object ex)
        {
            Equals(null, null);
        }
        catch(UException tex)
        {
            
        }
    }
}

class  Program
{
    static void Main()
    {
        Foo.Throw<Exception, Exception>();
    }
}


When I position the caret onto 'try' keyword and press Ctrl+W (Extend Selection), VS2005 crashes. If I uninstall ReSharper, everything is OK.
See attachment for full solution.

Issue was closed
Comments (3)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Vladimir Reshetnikov
  Vladimir Reshetnikov
05 Oct 2006 16:03
5 years ago
Further simplification shows that ReSharper cannot correctly handle circular dependency of generic parameters.
Simply copy-paste the following code in code editor:

class Foo
{
    static void Throw<TException, UException>() 
        where TException : UException
        where UException : TException
    {
        try
        {
        }
        catch(UException ex)
        {
        }
    }
}


VS2005 will crash.
Sergey Coox
  Sergey Coox
10 Oct 2006 12:21
5 years ago
ctrl+W has nothing in common with the problem, ReSharper craches as daemon starts.
Vladimir Reshetnikov
  Vladimir Reshetnikov
10 Oct 2006 12:35
5 years ago