Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2016-09-16 14:12:34 +0300
committerMarek Safar <marek.safar@gmail.com>2016-09-16 14:14:20 +0300
commit8d0eee7575928145f1e3d5b1e8e346cc22ab6ec9 (patch)
tree79d49716ad3a275342a238df0f94b2455540b0b8
parentebeb4e198070a5c7e1977658931994087137df22 (diff)
[mcs] Delay array base type interfaces initialization. Fixes #44402mono-4.6.0.251
-rw-r--r--mcs/mcs/typespec.cs30
1 files changed, 26 insertions, 4 deletions
diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs
index fb02370dbb3..696bde556c8 100644
--- a/mcs/mcs/typespec.cs
+++ b/mcs/mcs/typespec.cs
@@ -109,7 +109,6 @@ namespace Mono.CSharp
var imported = MemberDefinition as ImportedTypeDefinition;
if (imported != null && Kind != MemberKind.MissingType)
imported.DefineInterfaces (this);
-
}
return ifaces;
@@ -1603,6 +1602,12 @@ namespace Mono.CSharp
public TypeSpec Element { get; private set; }
+ public override IList<TypeSpec> Interfaces {
+ set {
+ throw new NotSupportedException ();
+ }
+ }
+
bool ITypeDefinition.IsComImport {
get {
return false;
@@ -1777,13 +1782,19 @@ namespace Mono.CSharp
readonly int rank;
readonly ModuleContainer module;
- private ArrayContainer (ModuleContainer module, TypeSpec element, int rank)
+ ArrayContainer (ModuleContainer module, TypeSpec element, int rank)
: base (MemberKind.ArrayType, element, null)
{
this.module = module;
this.rank = rank;
}
+ public override IList<TypeSpec> Interfaces {
+ get {
+ return BaseType.Interfaces;
+ }
+ }
+
public int Rank {
get {
return rank;
@@ -1926,7 +1937,6 @@ namespace Mono.CSharp
if (!module.ArrayTypesCache.TryGetValue (key, out ac)) {
ac = new ArrayContainer (module, element, rank);
ac.BaseType = module.Compiler.BuiltinTypes.Array;
- ac.Interfaces = ac.BaseType.Interfaces;
module.ArrayTypesCache.Add (key, ac);
}
@@ -1942,11 +1952,17 @@ namespace Mono.CSharp
class ReferenceContainer : ElementTypeSpec
{
- private ReferenceContainer (TypeSpec element)
+ ReferenceContainer (TypeSpec element)
: base (MemberKind.Class, element, null) // TODO: Kind.Class is most likely wrong
{
}
+ public override IList<TypeSpec> Interfaces {
+ get {
+ return null;
+ }
+ }
+
public override MetaType GetMetaInfo ()
{
if (info == null) {
@@ -1977,6 +1993,12 @@ namespace Mono.CSharp
state &= ~StateFlags.CLSCompliant_Undetected;
}
+ public override IList<TypeSpec> Interfaces {
+ get {
+ return null;
+ }
+ }
+
public override MetaType GetMetaInfo ()
{
if (info == null) {