Bug 41044 - Executing methods imported via "using static" is not working
Summary: Executing methods imported via "using static" is not working
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: 6.0.0 (C7)
Hardware: PC Mac OS
: Low enhancement
Target Milestone: 15.6
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2016-05-12 01:18 UTC by Iakiv Kramarenko
Modified: 2017-09-01 14:30 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
screenshot with evaluator dialog (82.14 KB, image/png)
2016-05-12 01:18 UTC, Iakiv Kramarenko
Details

Description Iakiv Kramarenko 2016-05-12 01:18:00 UTC
Created attachment 15980 [details]
screenshot with evaluator dialog

When I try to evaluate expression which invokes a method from current scope, 
e.g. S("#new-todo")

(it's from NSelene library, imported via: using static NSelene.Utils;


it fails with 

S("#new-todo")	Method `S' not found in type `NSeleneExamples.TodoMVC.DraftTests'.
Comment 1 Iakiv Kramarenko 2016-05-12 01:18:30 UTC
also can be reproduced in alpha version: 6.1
Comment 2 David Karlaš 2016-05-12 04:46:24 UTC
Title says any, but comment one is saying "using static NSelene.Utils;", so it doesn't see any method or just ones from"using static NSelene.Utils;"?
Comment 3 Iakiv Kramarenko 2016-05-12 05:20:03 UTC
Sorry...

Not any...
Comment 4 Iakiv Kramarenko 2016-05-12 05:26:38 UTC
I fixed the Title.

Actually the following "direct" code would work:

NSelene.Utils.S("#new-todo")

And the following:


NSelene.Utils.S("#new-todo").SetValue("do something")

Do not...

Where SetValue - is an Extension method for Class that S returns...

So, 

methods that does not work:
- imported via using static
- extension methods

Seems like extension methods do not work because because in order to use them I should 
add a "using" statement for them.

In my case:

using NSelene

Seems like "any method" - makes sense with a condition: "any method that needs importing via using statement"

Note You need to log in before you can comment on or make changes to this bug.