Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bingbingbingbing
mono
提交
29281b99
M
mono
项目概览
bingbingbingbing
/
mono
与 Fork 源项目一致
从无法访问的项目Fork
通知
35
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mono
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
29281b99
编写于
10月 01, 2010
作者:
M
Marek Safar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Keep imported indexer parameters (they can contain non-inflated type parameters)
上级
76368b52
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
69 addition
and
5 deletion
+69
-5
mcs/mcs/import.cs
mcs/mcs/import.cs
+29
-4
mcs/tests/gtest-165-lib.cs
mcs/tests/gtest-165-lib.cs
+16
-0
mcs/tests/gtest-165.cs
mcs/tests/gtest-165.cs
+13
-0
mcs/tests/ver-il-gmcs.xml
mcs/tests/ver-il-gmcs.xml
+11
-1
未找到文件。
mcs/mcs/import.cs
浏览文件 @
29281b99
...
...
@@ -377,8 +377,6 @@ namespace Mono.CSharp
//
public
PropertySpec
CreateProperty
(
PropertyInfo
pi
,
TypeSpec
declaringType
,
MethodSpec
get
,
MethodSpec
set
)
{
var
definition
=
new
ImportedMemberDefinition
(
pi
);
Modifiers
mod
=
0
;
AParametersCollection
param
=
null
;
TypeSpec
type
=
null
;
...
...
@@ -472,11 +470,11 @@ namespace Mono.CSharp
}
if
(
is_valid_property
)
spec
=
new
IndexerSpec
(
declaringType
,
definition
,
type
,
param
,
pi
,
mod
);
spec
=
new
IndexerSpec
(
declaringType
,
new
ImportedIndexerDefinition
(
pi
,
param
)
,
type
,
param
,
pi
,
mod
);
}
if
(
spec
==
null
)
spec
=
new
PropertySpec
(
MemberKind
.
Property
,
declaringType
,
definition
,
type
,
pi
,
mod
);
spec
=
new
PropertySpec
(
MemberKind
.
Property
,
declaringType
,
new
ImportedMemberDefinition
(
pi
)
,
type
,
pi
,
mod
);
if
(!
is_valid_property
)
{
spec
.
IsNotRealProperty
=
true
;
...
...
@@ -1042,6 +1040,33 @@ namespace Mono.CSharp
#
endregion
}
class
ImportedIndexerDefinition
:
ImportedMemberDefinition
,
IParametersMember
{
readonly
AParametersCollection
parameters
;
public
ImportedIndexerDefinition
(
PropertyInfo
provider
,
AParametersCollection
parameters
)
:
base
(
provider
)
{
this
.
parameters
=
parameters
;
}
#
region
Properties
public
AParametersCollection
Parameters
{
get
{
return
parameters
;
}
}
public
TypeSpec
MemberType
{
get
{
throw
new
NotImplementedException
();
}
}
#
endregion
}
class
ImportedGenericMethodDefinition
:
ImportedMethodDefinition
,
IGenericMethodDefinition
{
TypeParameterSpec
[]
tparams
;
...
...
mcs/tests/gtest-165-lib.cs
0 → 100644
浏览文件 @
29281b99
// Compiler options: -t:library
public
class
A
<
T
>
{
public
int
this
[
T
arg
]
{
get
{
return
1
;
}
}
public
int
this
[
string
arg
]
{
get
{
return
2
;
}
}
}
mcs/tests/gtest-165.cs
0 → 100644
浏览文件 @
29281b99
// Compiler options: -r:gtest-165-lib.dll
class
C
{
public
static
int
Main
()
{
var
a
=
new
A
<
string
>();
if
(
a
[
"s"
]
!=
2
)
return
1
;
return
0
;
}
}
\ No newline at end of file
mcs/tests/ver-il-gmcs.xml
浏览文件 @
29281b99
...
...
@@ -4367,6 +4367,16 @@
</method>
</type>
</test>
<test name="gtest-165.cs">
<type name="C">
<method name="Int32 Main()">
<size>27</size>
</method>
<method name="Void .ctor()">
<size>7</size>
</method>
</type>
</test>
<test name="gtest-166.cs">
<type name="C">
<method name="Void .ctor()">
...
...
@@ -41572,7 +41582,7 @@
<test name="test-789.cs">
<type name="Program">
<method name="Void Main()">
<size>
50
</size>
<size>
76
</size>
</method>
<method name="Void <Main>m__0()">
<size>7</size>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录