Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
034718af
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
034718af
编写于
3月 25, 2014
作者:
Y
YingP99
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a skipped test for CodePlex Bug #16 (changeset 1215097)
上级
04aabe40
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
82 addition
and
0 deletion
+82
-0
Src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
...Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
+82
-0
未找到文件。
Src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs
浏览文件 @
034718af
...
...
@@ -968,6 +968,88 @@ public void M(dynamic arg = null)
CompileAndVerify(source, new[] { SystemCoreRef });
}
[Fact(Skip = "16"), WorkItem(16)]
public void RemoveAtOfKeywordAsDynamicMemberName()
{
string source = @"
using System;
class C
{
public int @default = 123;
public int @while() { return 456; }
static void Main()
{
dynamic dyn = new C();
dyn.@default = dyn.@while();
}
}
";
CompileAndVerifyIL(source, "C.Main", @"
Actual:
{
// Code size 169 (0xa9)
.maxstack 12
.locals init (object V_0) //dyn
IL_0000: newobj ""C..ctor()""
IL_0005: stloc.0
IL_0006: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>> C.<Main>o__SiteContainer0.<>p__Site2""
IL_000b: brtrue.s IL_0046
IL_000d: ldc.i4.0
IL_000e: ldstr ""default""
IL_0013: ldtoken ""C""
IL_0018: call ""System.Type System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)""
IL_001d: ldc.i4.2
IL_001e: newarr ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo""
IL_0023: dup
IL_0024: ldc.i4.0
IL_0025: ldc.i4.0
IL_0026: ldnull
IL_0027: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_002c: stelem.ref
IL_002d: dup
IL_002e: ldc.i4.1
IL_002f: ldc.i4.0
IL_0030: ldnull
IL_0031: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_0036: stelem.ref
IL_0037: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.SetMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Type, System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>)""
IL_003c: call ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)""
IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>> C.<Main>o__SiteContainer0.<>p__Site2""
IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>> C.<Main>o__SiteContainer0.<>p__Site2""
IL_004b: ldfld ""System.Func<System.Runtime.CompilerServices.CallSite, object, object, object> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>>.Target""
IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>> C.<Main>o__SiteContainer0.<>p__Site2""
IL_0055: ldloc.0
IL_0056: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>> C.<Main>o__SiteContainer0.<>p__Site1""
IL_005b: brtrue.s IL_008d
IL_005d: ldc.i4.0
IL_005e: ldstr ""while""
IL_0063: ldnull
IL_0064: ldtoken ""C""
IL_0069: call ""System.Type System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)""
IL_006e: ldc.i4.1
IL_006f: newarr ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo""
IL_0074: dup
IL_0075: ldc.i4.0
IL_0076: ldc.i4.0
IL_0077: ldnull
IL_0078: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)""
IL_007d: stelem.ref
IL_007e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable<System.Type>, System.Type, System.Collections.Generic.IEnumerable<Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo>)""
IL_0083: call ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)""
IL_0088: stsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>> C.<Main>o__SiteContainer0.<>p__Site1""
IL_008d: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>> C.<Main>o__SiteContainer0.<>p__Site1""
IL_0092: ldfld ""System.Func<System.Runtime.CompilerServices.CallSite, object, object> System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>>.Target""
IL_0097: ldsfld ""System.Runtime.CompilerServices.CallSite<System.Func<System.Runtime.CompilerServices.CallSite, object, object>> C.<Main>o__SiteContainer0.<>p__Site1""
IL_009c: ldloc.0
IL_009d: callvirt ""object System.Func<System.Runtime.CompilerServices.CallSite, object, object>.Invoke(System.Runtime.CompilerServices.CallSite, object)""
IL_00a2: callvirt ""object System.Func<System.Runtime.CompilerServices.CallSite, object, object, object>.Invoke(System.Runtime.CompilerServices.CallSite, object, object)""
IL_00a7: pop
IL_00a8: ret
}
");
}
#endregion
#region Conversions
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录