-
Notifications
You must be signed in to change notification settings - Fork 257
Ambiguous call in dbg.inject<ID> #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The cause of the problem is the fact that in your test the referenced assemblies are compiled with the This is expected compiling behavior but not expected user experience. I have already identified the measures to fix in the the next release:
Until it's done please disable debug printing system wide:
|
… regular expressions to be used in auto-injected `dbg.cs`. * Issue #79: Ambiguous call in dbg.inject<ID> - Added CLI `-dbgprint:<1|0>` - dbg.cs is changed to avoid referencing its own members (`dbg.print(...)`) - Added dedicated error message on `dbg.print(...)` collision/ambiguity compiling error
I see. Wouldn't it be safer if |
I was tossing for quite some time about this one. :) No it wouldn't be safer. It would be exactly as safe. The code below illustrates the issue: // scriptA.dll
static class Extensions
{
public static void print(this object obj) {...}
}
// scriptB.dll
static class Extensions
{
public static void print(this object obj) {...}
}
// master_script.cs
void main()
{
"test".print();
} If the master script does not make For example with the fix that I committed 2 days ago your code sample will not need any change at all. You don't need to touch DbgPrint despite the fact that it will be enabled. However if the master script calls |
One point I forgot to make... The earlier release you used for testing caused the conflict not because DbgPrint was enabled but because of the mistake in |
Verified with 3.27.1, no error message anymore. |
Thank you. Closing it now. |
While trying to compose a test script environment related to #71 I ran into this issue:
Can be reproduced by extracting the attached files into a temporary location, place
cscs.exe
into the\Redirect
folder and runcscs.exe -cd RedirectRefLib.cs
.Issue #79.zip
The text was updated successfully, but these errors were encountered: