mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
806 B
58 lines
806 B
using System; |
|
|
|
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
|
{ |
|
internal class Discards |
|
{ |
|
public class @_ |
|
{ |
|
|
|
} |
|
|
|
public void GetOut(out int value) |
|
{ |
|
value = 0; |
|
} |
|
|
|
public void GetOutOverloaded(out int value) |
|
{ |
|
value = 0; |
|
} |
|
|
|
public void GetOutOverloaded(out string value) |
|
{ |
|
value = "Hello World"; |
|
} |
|
|
|
public void MakeValue(Func<object, string, int> func) |
|
{ |
|
|
|
} |
|
|
|
public void MakeValue(Func<@_, int> func) |
|
{ |
|
|
|
} |
|
|
|
public void SimpleParameter(@_ _) |
|
{ |
|
} |
|
|
|
public void ParameterHiddenByLocal(@_ _) |
|
{ |
|
GetOut(out var _); |
|
} |
|
|
|
public void DiscardedOutVsLambdaParameter() |
|
{ |
|
GetOut(out var _); |
|
MakeValue((@_ _) => 5); |
|
} |
|
|
|
public void ExplicitlyTypedDiscard() |
|
{ |
|
GetOutOverloaded(out string _); |
|
GetOutOverloaded(out int _); |
|
} |
|
} |
|
}
|
|
|