Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-294589: Smart completion after 'await' inserts wrong method

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Apr 15, 2012 12:08:10 AM
Updated Apr 15, 2012 12:08:10 AM
Priority Normal
Type Bug
Fix versions No Fix versions
State Submitted
Assignee Unassigned
Subsystem No subsystem
Affected versions No Affected versions
Fixed in build No Fixed in build
using System.Collections;
using System.Threading.Tasks;

class A
{
    async void Foo()
    {
        IEnumerable x = await {caret} // Smart completion
    }

    private Task<string> Bar()
    {
        throw new System.NotImplementedException();
    }
}


Actual:

using System.Collections;
using System.Threading.Tasks;

class A
{
    async void Foo()
    {
        IEnumerable x = await MemberwiseClone() // error CS4001: Cannot await 'object'
    }

    private Task<string> Bar()
    {
        throw new System.NotImplementedException();
    }
}


Expected:

using System.Collections;
using System.Threading.Tasks;

class A
{
    async void Foo()
    {
        IEnumerable x = await Bar() // OK
    }

    private Task<string> Bar()
    {
        throw new System.NotImplementedException();
    }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>