Browse Source

Use static instances on KnownTypeReference for the built-in C# types.

newNRvisualizers
Daniel Grunwald 15 years ago
parent
commit
eaee5bf5ee
  1. 2
      ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs
  2. 39
      ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs
  3. 20
      ICSharpCode.NRefactory/CSharp/Resolver/CSharpResolver.cs
  4. 2
      ICSharpCode.NRefactory/CSharp/Resolver/Conversions.cs
  5. 5
      ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs
  6. 1
      ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj
  7. 2
      ICSharpCode.NRefactory/TypeSystem/ArrayType.cs
  8. 13
      ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
  9. 2
      ICSharpCode.NRefactory/TypeSystem/ExtensionMethods.cs
  10. 7
      ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleInterningProvider.cs
  11. 103
      ICSharpCode.NRefactory/TypeSystem/KnownTypeReference.cs
  12. 33
      ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs
  13. 1
      ICSharpCode.NRefactory/TypeSystem/SharedTypes.cs

2
ICSharpCode.NRefactory.Tests/CSharp/Resolver/LambdaTests.cs

@ -6,7 +6,7 @@ using NUnit.Framework; @@ -6,7 +6,7 @@ using NUnit.Framework;
namespace ICSharpCode.NRefactory.CSharp.Resolver
{
[TestFixture, Ignore("Lambda support not yet implemented")]
[TestFixture, Ignore("Lambdas are not yet implemented")]
public class LambdaTests : ResolverTestBase
{
[Test]

39
ICSharpCode.NRefactory/CSharp/Parser/TypeSystemConvertVisitor.cs

@ -166,7 +166,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -166,7 +166,7 @@ namespace ICSharpCode.NRefactory.CSharp
}
static readonly ITypeReference multicastDelegateReference = typeof(MulticastDelegate).ToTypeReference();
static readonly IParameter delegateObjectParameter = MakeParameter(TypeCode.Object.ToTypeReference(), "object");
static readonly IParameter delegateObjectParameter = MakeParameter(KnownTypeReference.Object, "object");
static readonly IParameter delegateIntPtrMethodParameter = MakeParameter(typeof(IntPtr).ToTypeReference(), "method");
static readonly IParameter delegateAsyncCallbackParameter = MakeParameter(typeof(AsyncCallback).ToTypeReference(), "callback");
static readonly IParameter delegateResultParameter = MakeParameter(typeof(IAsyncResult).ToTypeReference(), "result");
@ -373,7 +373,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -373,7 +373,7 @@ namespace ICSharpCode.NRefactory.CSharp
dtor.BodyRegion = MakeRegion(destructorDeclaration.Body);
dtor.Accessibility = Accessibility.Protected;
dtor.IsOverride = true;
dtor.ReturnType = ReflectionHelper.VoidReference;
dtor.ReturnType = KnownTypeReference.Void;
ConvertAttributes(dtor.Attributes, destructorDeclaration.Attributes);
@ -525,35 +525,37 @@ namespace ICSharpCode.NRefactory.CSharp @@ -525,35 +525,37 @@ namespace ICSharpCode.NRefactory.CSharp
if (p != null) {
switch (p.Keyword) {
case "string":
return TypeCode.String.ToTypeReference();
return KnownTypeReference.String;
case "int":
return TypeCode.Int32.ToTypeReference();
return KnownTypeReference.Int32;
case "uint":
return TypeCode.UInt32.ToTypeReference();
return KnownTypeReference.UInt32;
case "object":
return TypeCode.Object.ToTypeReference();
return KnownTypeReference.Object;
case "bool":
return TypeCode.Boolean.ToTypeReference();
return KnownTypeReference.Boolean;
case "sbyte":
return TypeCode.SByte.ToTypeReference();
return KnownTypeReference.SByte;
case "byte":
return TypeCode.Byte.ToTypeReference();
return KnownTypeReference.Byte;
case "short":
return TypeCode.Int16.ToTypeReference();
return KnownTypeReference.Int16;
case "ushort":
return TypeCode.UInt16.ToTypeReference();
return KnownTypeReference.UInt16;
case "long":
return TypeCode.Int64.ToTypeReference();
return KnownTypeReference.Int64;
case "ulong":
return TypeCode.UInt64.ToTypeReference();
return KnownTypeReference.UInt64;
case "float":
return TypeCode.Single.ToTypeReference();
return KnownTypeReference.Single;
case "double":
return TypeCode.Double.ToTypeReference();
return KnownTypeReference.Double;
case "decimal":
return TypeCode.Decimal.ToTypeReference();
return ReflectionHelper.ToTypeReference(TypeCode.Decimal);
case "char":
return KnownTypeReference.Char;
case "void":
return ReflectionHelper.VoidReference;
return KnownTypeReference.Void;
default:
return SharedTypes.UnknownType;
}
@ -601,6 +603,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -601,6 +603,7 @@ namespace ICSharpCode.NRefactory.CSharp
#region Constant Values
IConstantValue ConvertConstantValue(ITypeReference targetType, DomNode expression)
{
// TODO: implement ConvertConstantValue
return new SimpleConstantValue(targetType, null);
}
#endregion
@ -625,7 +628,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -625,7 +628,7 @@ namespace ICSharpCode.NRefactory.CSharp
p.IsParams = true;
break;
}
if (pd.DefaultExpression != null)
if (!pd.DefaultExpression.IsNull)
p.DefaultValue = ConvertConstantValue(p.Type, pd.DefaultExpression);
outputList.Add(p);
}

20
ICSharpCode.NRefactory/CSharp/Resolver/CSharpResolver.cs

@ -439,7 +439,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -439,7 +439,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
switch (op) {
case UnaryOperatorType.Minus:
if (code == TypeCode.UInt32) {
IType targetType = TypeCode.Int64.ToTypeReference().Resolve(context);
IType targetType = KnownTypeReference.Int64.Resolve(context);
type = targetType;
if (isNullable) targetType = NullableType.Create(targetType, context);
return ResolveCast(targetType, expression);
@ -448,7 +448,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -448,7 +448,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
case UnaryOperatorType.Plus:
case UnaryOperatorType.BitNot:
if (code >= TypeCode.Char && code <= TypeCode.UInt16) {
IType targetType = TypeCode.Int32.ToTypeReference().Resolve(context);
IType targetType = KnownTypeReference.Int32.Resolve(context);
type = targetType;
if (isNullable) targetType = NullableType.Create(targetType, context);
return ResolveCast(targetType, expression);
@ -700,7 +700,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -700,7 +700,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (lhsType is PointerType && IsInteger(ReflectionHelper.GetTypeCode(rhsType))) {
return new ResolveResult(lhsType);
} else if (lhsType is PointerType && lhsType.Equals(rhsType)) {
return new ResolveResult(TypeCode.Int64.ToTypeReference().Resolve(context));
return new ResolveResult(KnownTypeReference.Int64.Resolve(context));
}
if (lhsType == SharedTypes.Null && rhsType == SharedTypes.Null)
return new ErrorResolveResult(SharedTypes.Null);
@ -727,7 +727,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -727,7 +727,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// bool operator op(E x, E y);
return HandleEnumComparison(op, rhsType, isNullable, lhs, rhs);
} else if (lhsType is PointerType && rhsType is PointerType) {
return new ResolveResult(TypeCode.Boolean.ToTypeReference().Resolve(context));
return new ResolveResult(KnownTypeReference.Boolean.Resolve(context));
}
switch (op) {
case BinaryOperatorType.Equality:
@ -829,7 +829,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -829,7 +829,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
return rhs;
return ResolveBinaryOperator(op, lhs, rhs);
}
return new ResolveResult(TypeCode.Boolean.ToTypeReference().Resolve(context));
return new ResolveResult(KnownTypeReference.Boolean.Resolve(context));
}
/// <summary>
@ -1164,7 +1164,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1164,7 +1164,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public StringConcatenation(TypeCode p1, TypeCode p2)
{
this.canEvaluateAtCompileTime = p1 == TypeCode.String && p2 == TypeCode.String;
this.ReturnType = TypeCode.String.ToTypeReference();
this.ReturnType = KnownTypeReference.String;
this.Parameters.Add(MakeParameter(p1));
this.Parameters.Add(MakeParameter(p2));
}
@ -1224,7 +1224,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1224,7 +1224,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
this.Negate = negate;
this.Type = type;
this.ReturnType = TypeCode.Boolean.ToTypeReference();
this.ReturnType = KnownTypeReference.Boolean;
this.Parameters.Add(MakeParameter(type));
this.Parameters.Add(MakeParameter(type));
}
@ -1309,7 +1309,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1309,7 +1309,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public RelationalOperatorMethod(Func<T1, T2, bool> func)
{
this.ReturnType = TypeCode.Boolean.ToTypeReference();
this.ReturnType = KnownTypeReference.Boolean;
this.Parameters.Add(MakeParameter(Type.GetTypeCode(typeof(T1))));
this.Parameters.Add(MakeParameter(Type.GetTypeCode(typeof(T2))));
this.func = func;
@ -1772,7 +1772,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1772,7 +1772,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
// argument might be a lambda or delegate type, so we have to try to guess the delegate type
IType type = arguments[i].Type;
if (type == SharedTypes.Null || type == SharedTypes.UnknownType) {
list.Add(new DefaultParameter(TypeCode.Object.ToTypeReference(), argumentNames[i]));
list.Add(new DefaultParameter(KnownTypeReference.Object, argumentNames[i]));
} else {
list.Add(new DefaultParameter(type, argumentNames[i]));
}
@ -1867,7 +1867,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1867,7 +1867,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
/// </summary>
public ResolveResult ResolveSizeOf(IType type)
{
IType int32 = TypeCode.Int32.ToTypeReference().Resolve(context);
IType int32 = KnownTypeReference.Int32.Resolve(context);
int size;
switch (ReflectionHelper.GetTypeCode(type)) {
case TypeCode.Boolean:

2
ICSharpCode.NRefactory/CSharp/Resolver/Conversions.cs

@ -21,7 +21,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -21,7 +21,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
if (context == null)
throw new ArgumentNullException("context");
this.context = context;
this.objectType = TypeCode.Object.ToTypeReference().Resolve(context);
this.objectType = KnownTypeReference.Object.Resolve(context);
this.dynamicErasure = new DynamicErasure(this);
}

5
ICSharpCode.NRefactory/CSharp/Resolver/ResolveVisitor.cs

@ -623,7 +623,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -623,7 +623,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
public override ResolveResult VisitIsExpression(IsExpression isExpression, object data)
{
ScanChildren(isExpression);
return new ResolveResult(TypeCode.Boolean.ToTypeReference().Resolve(resolver.Context));
return new ResolveResult(KnownTypeReference.Boolean.Resolve(resolver.Context));
}
public override ResolveResult VisitLambdaExpression(LambdaExpression lambdaExpression, object data)
@ -779,6 +779,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -779,6 +779,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
{
resolver.PushBlock();
ITypeReference type = MakeTypeReference(foreachStatement.VariableType, foreachStatement.Expression, true);
resolver.AddVariable(type, foreachStatement.VariableName);
ScanChildren(foreachStatement);
resolver.PopBlock();
return null;
@ -1015,7 +1016,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver @@ -1015,7 +1016,7 @@ namespace ICSharpCode.NRefactory.CSharp.Resolver
return pt.TypeArguments[0];
}
} else if (baseTypeDef.Namespace == "System.Collections" && baseTypeDef.TypeParameterCount == 0) {
return TypeCode.Object.ToTypeReference().Resolve(storedContext.Context);
return KnownTypeReference.Object.Resolve(storedContext.Context);
}
}
}

1
ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj

@ -243,6 +243,7 @@ @@ -243,6 +243,7 @@
<Compile Include="TypeSystem\ITypeParameter.cs" />
<Compile Include="TypeSystem\ITypeReference.cs" />
<Compile Include="TypeSystem\ITypeResolveContext.cs" />
<Compile Include="TypeSystem\KnownTypeReference.cs" />
<Compile Include="TypeSystem\NullableType.cs" />
<Compile Include="TypeSystem\ParameterizedType.cs" />
<Compile Include="TypeSystem\ParameterListComparer.cs" />

2
ICSharpCode.NRefactory/TypeSystem/ArrayType.cs

@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -68,7 +68,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
return systemArray.Resolve(context).GetMethods(context, filter);
}
static readonly DefaultParameter indexerParam = new DefaultParameter(TypeCode.Int32.ToTypeReference(), string.Empty);
static readonly DefaultParameter indexerParam = new DefaultParameter(KnownTypeReference.Int32, string.Empty);
public override IEnumerable<IProperty> GetProperties(ITypeResolveContext context, Predicate<IProperty> filter = null)
{

13
ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -330,6 +330,9 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -330,6 +330,9 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
static readonly DefaultAttribute serializableAttribute = new DefaultAttribute(typeof(SerializableAttribute).ToTypeReference());
static readonly ITypeReference structLayoutAttributeTypeRef = typeof(StructLayoutAttribute).ToTypeReference();
static readonly ITypeReference layoutKindTypeRef = typeof(LayoutKind).ToTypeReference();
static readonly ITypeReference charSetTypeRef = typeof(CharSet).ToTypeReference();
void AddAttributes(TypeDefinition typeDefinition, ITypeDefinition targetEntity)
{
@ -361,22 +364,22 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -361,22 +364,22 @@ namespace ICSharpCode.NRefactory.TypeSystem
break;
}
if (layoutKind != LayoutKind.Auto || charSet != CharSet.Ansi || typeDefinition.PackingSize > 0 || typeDefinition.ClassSize > 0) {
DefaultAttribute structLayout = new DefaultAttribute(typeof(StructLayoutAttribute).ToTypeReference());
structLayout.PositionalArguments.Add(new SimpleConstantValue(typeof(LayoutKind).ToTypeReference(), (int)layoutKind));
DefaultAttribute structLayout = new DefaultAttribute(structLayoutAttributeTypeRef);
structLayout.PositionalArguments.Add(new SimpleConstantValue(layoutKindTypeRef, (int)layoutKind));
if (charSet != CharSet.Ansi) {
structLayout.NamedArguments.Add(new KeyValuePair<string, IConstantValue>(
"CharSet",
new SimpleConstantValue(typeof(CharSet).ToTypeReference(), (int)charSet)));
new SimpleConstantValue(charSetTypeRef, (int)charSet)));
}
if (typeDefinition.PackingSize > 0) {
structLayout.NamedArguments.Add(new KeyValuePair<string, IConstantValue>(
"Pack",
new SimpleConstantValue(typeof(int).ToTypeReference(), (int)typeDefinition.PackingSize)));
new SimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.PackingSize)));
}
if (typeDefinition.ClassSize > 0) {
structLayout.NamedArguments.Add(new KeyValuePair<string, IConstantValue>(
"Size",
new SimpleConstantValue(typeof(int).ToTypeReference(), (int)typeDefinition.ClassSize)));
new SimpleConstantValue(KnownTypeReference.Int32, (int)typeDefinition.ClassSize)));
}
targetEntity.Attributes.Add(structLayout);
}

2
ICSharpCode.NRefactory/TypeSystem/ExtensionMethods.cs

@ -152,7 +152,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -152,7 +152,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
if (def.BaseTypes.Count == 1)
return def.BaseTypes[0].Resolve(context);
else
return TypeCode.Int32.ToTypeReference().Resolve(context);
return KnownTypeReference.Int32.Resolve(context);
} else {
throw new ArgumentException("enumType must be an enum");
}

7
ICSharpCode.NRefactory/TypeSystem/Implementation/SimpleInterningProvider.cs

@ -16,6 +16,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -16,6 +16,13 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
/// </summary>
public sealed class SimpleInterningProvider : IInterningProvider
{
public SimpleInterningProvider()
{
// Intern the well-known types first; so that they are used when possible.
foreach (ITypeReference r in KnownTypeReference.AllKnownTypeReferences)
Intern(r);
}
sealed class ReferenceComparer : IEqualityComparer<object>
{
public readonly static ReferenceComparer Instance = new ReferenceComparer();

103
ICSharpCode.NRefactory/TypeSystem/KnownTypeReference.cs

@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using ICSharpCode.NRefactory.TypeSystem.Implementation;
namespace ICSharpCode.NRefactory.TypeSystem
{
/// <summary>
/// Contains well-known type references.
/// </summary>
public static class KnownTypeReference
{
/// <summary>
/// Gets a type reference pointing to the <c>void</c> type.
/// </summary>
public static readonly ITypeReference Void = new GetClassTypeReference("System", "Void", 0);
/// <summary>
/// Gets a type reference pointing to the <c>object</c> type.
/// </summary>
public static readonly ITypeReference Object = new GetClassTypeReference("System", "Object", 0);
/// <summary>
/// Gets a type reference pointing to the <c>bool</c> type.
/// </summary>
public static readonly ITypeReference Boolean = new GetClassTypeReference("System", "Boolean", 0);
/// <summary>
/// Gets a type reference pointing to the <c>sbyte</c> type.
/// </summary>
public static readonly ITypeReference SByte = new GetClassTypeReference("System", "SByte", 0);
/// <summary>
/// Gets a type reference pointing to the <c>byte</c> type.
/// </summary>
public static readonly ITypeReference Byte = new GetClassTypeReference("System", "Byte", 0);
/// <summary>
/// Gets a type reference pointing to the <c>short</c> type.
/// </summary>
public static readonly ITypeReference Int16 = new GetClassTypeReference("System", "Int16", 0);
/// <summary>
/// Gets a type reference pointing to the <c>ushort</c> type.
/// </summary>
public static readonly ITypeReference UInt16 = new GetClassTypeReference("System", "UInt16", 0);
/// <summary>
/// Gets a type reference pointing to the <c>int</c> type.
/// </summary>
public static readonly ITypeReference Int32 = new GetClassTypeReference("System", "Int32", 0);
/// <summary>
/// Gets a type reference pointing to the <c>uint</c> type.
/// </summary>
public static readonly ITypeReference UInt32 = new GetClassTypeReference("System", "UInt32", 0);
/// <summary>
/// Gets a type reference pointing to the <c>long</c> type.
/// </summary>
public static readonly ITypeReference Int64 = new GetClassTypeReference("System", "Int64", 0);
/// <summary>
/// Gets a type reference pointing to the <c>ulong</c> type.
/// </summary>
public static readonly ITypeReference UInt64 = new GetClassTypeReference("System", "UInt64", 0);
/// <summary>
/// Gets a type reference pointing to the <c>string</c> type.
/// </summary>
public static readonly ITypeReference String = new GetClassTypeReference("System", "String", 0);
/// <summary>
/// Gets a type reference pointing to the <c>char</c> type.
/// </summary>
public static readonly ITypeReference Char = new GetClassTypeReference("System", "Char", 0);
/// <summary>
/// Gets a type reference pointing to the <c>float</c> type.
/// </summary>
public static readonly ITypeReference Single = new GetClassTypeReference("System", "Single", 0);
/// <summary>
/// Gets a type reference pointing to the <c>double</c> type.
/// </summary>
public static readonly ITypeReference Double = new GetClassTypeReference("System", "Double", 0);
/// <summary>
/// Gets all known type references.
/// </summary>
public static IEnumerable<ITypeReference> AllKnownTypeReferences {
get {
return new[] {
Void, Object, Boolean,
SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64,
String, Char, Single, Double
};
}
}
}
}

33
ICSharpCode.NRefactory/TypeSystem/ReflectionHelper.cs

@ -155,31 +155,26 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -155,31 +155,26 @@ namespace ICSharpCode.NRefactory.TypeSystem
#endregion
#region TypeCode.ToTypeReference()
/// <summary>
/// Gets a type reference pointing to the <c>void</c> type.
/// </summary>
public static readonly ITypeReference VoidReference = new GetClassTypeReference("System", "Void", 0);
static readonly ITypeReference[] primitiveTypeReferences = {
SharedTypes.UnknownType, // TypeCode.Empty
new GetClassTypeReference("System", "Object", 0),
KnownTypeReference.Object,
new GetClassTypeReference("System", "DBNull", 0),
new GetClassTypeReference("System", "Boolean", 0),
new GetClassTypeReference("System", "Char", 0),
new GetClassTypeReference("System", "SByte", 0),
new GetClassTypeReference("System", "Byte", 0),
new GetClassTypeReference("System", "Int16", 0),
new GetClassTypeReference("System", "UInt16", 0),
new GetClassTypeReference("System", "Int32", 0),
new GetClassTypeReference("System", "UInt32", 0),
new GetClassTypeReference("System", "Int64", 0),
new GetClassTypeReference("System", "UInt64", 0),
new GetClassTypeReference("System", "Single", 0),
new GetClassTypeReference("System", "Double", 0),
KnownTypeReference.Boolean,
KnownTypeReference.Char,
KnownTypeReference.SByte,
KnownTypeReference.Byte,
KnownTypeReference.Int16,
KnownTypeReference.UInt16,
KnownTypeReference.Int32,
KnownTypeReference.UInt32,
KnownTypeReference.Int64,
KnownTypeReference.UInt64,
KnownTypeReference.Single,
KnownTypeReference.Double,
new GetClassTypeReference("System", "Decimal", 0),
new GetClassTypeReference("System", "DateTime", 0),
SharedTypes.UnknownType, // (TypeCode)17 has no enum value?
new GetClassTypeReference("System", "String", 0)
KnownTypeReference.String
};
/// <summary>

1
ICSharpCode.NRefactory/TypeSystem/SharedTypes.cs

@ -48,7 +48,6 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -48,7 +48,6 @@ namespace ICSharpCode.NRefactory.TypeSystem
* would have to return true even though these are two distinct definitions.
*/
/// <summary>
/// Type representing resolve errors.
/// </summary>

Loading…
Cancel
Save