More tweaks for nullable binary operation
[mono.git] / mcs / mcs / field.cs
1 //
2 // field.cs: All field handlers
3 //
4 // Authors: Miguel de Icaza (miguel@gnu.org)
5 //          Martin Baulig (martin@ximian.com)
6 //          Marek Safar (marek.safar@seznam.cz)
7 //
8 // Dual licensed under the terms of the MIT X11 or GNU GPL
9 //
10 // Copyright 2001, 2002, 2003 Ximian, Inc (http://www.ximian.com)
11 // Copyright 2004-2008 Novell, Inc
12 //
13
14 using System;
15 using System.Collections.Generic;
16 using System.Reflection;
17 using System.Reflection.Emit;
18 using System.Runtime.InteropServices;
19
20 namespace Mono.CSharp
21 {
22         public class FieldDeclarator
23         {
24                 public FieldDeclarator (SimpleMemberName name, Expression initializer)
25                 {
26                         this.Name = name;
27                         this.Initializer = initializer;
28                 }
29
30                 #region Properties
31
32                 public SimpleMemberName Name { get; private set; }
33                 public Expression Initializer { get; private set; }
34
35                 #endregion
36         }
37
38         //
39         // Abstract class for all fields
40         //
41         abstract public class FieldBase : MemberBase
42         {
43                 protected FieldBuilder FieldBuilder;
44                 protected FieldSpec spec;
45                 public Status status;
46                 protected Expression initializer;
47                 protected List<FieldDeclarator> declarators;
48
49                 [Flags]
50                 public enum Status : byte {
51                         HAS_OFFSET = 4          // Used by FieldMember.
52                 }
53
54                 static readonly string[] attribute_targets = new string [] { "field" };
55
56                 protected FieldBase (DeclSpace parent, FullNamedExpression type, Modifiers mod,
57                                      Modifiers allowed_mod, MemberName name, Attributes attrs)
58                         : base (parent, null, type, mod, allowed_mod | Modifiers.ABSTRACT, Modifiers.PRIVATE,
59                                 name, attrs)
60                 {
61                         if ((mod & Modifiers.ABSTRACT) != 0)
62                                 Report.Error (681, Location, "The modifier 'abstract' is not valid on fields. Try using a property instead");
63                 }
64
65                 #region Properties
66
67                 public override AttributeTargets AttributeTargets {
68                         get {
69                                 return AttributeTargets.Field;
70                         }
71                 }
72
73                 public Expression Initializer {
74                         get {
75                                 return initializer;
76                         }
77                         set {
78                                 this.initializer = value;
79                         }
80                 }
81
82                 public FieldSpec Spec {
83                         get {
84                                 return spec;
85                         }
86                 }
87
88                 public override string[] ValidAttributeTargets  {
89                         get {
90                                 return attribute_targets;
91                         }
92                 }
93
94                 #endregion
95
96                 public void AddDeclarator (FieldDeclarator declarator)
97                 {
98                         if (declarators == null)
99                                 declarators = new List<FieldDeclarator> (2);
100
101                         declarators.Add (declarator);
102
103                         // TODO: This will probably break
104                         Parent.AddMember (this, declarator.Name.Value);
105                 }
106
107                 public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
108                 {
109                         if (a.Type == pa.FieldOffset) {
110                                 status |= Status.HAS_OFFSET;
111
112                                 if (!Parent.PartialContainer.HasExplicitLayout) {
113                                         Report.Error (636, Location, "The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit)");
114                                         return;
115                                 }
116
117                                 if ((ModFlags & Modifiers.STATIC) != 0 || this is Const) {
118                                         Report.Error (637, Location, "The FieldOffset attribute is not allowed on static or const fields");
119                                         return;
120                                 }
121                         }
122
123                         if (a.Type == pa.FixedBuffer) {
124                                 Report.Error (1716, Location, "Do not use 'System.Runtime.CompilerServices.FixedBuffer' attribute. Use the 'fixed' field modifier instead");
125                                 return;
126                         }
127
128 #if false
129                         if (a.Type == pa.MarshalAs) {
130                                 UnmanagedMarshal marshal = a.GetMarshal (this);
131                                 if (marshal != null) {
132                                         FieldBuilder.SetMarshal (marshal);
133                                 }
134                                 return;
135                         }
136 #endif
137                         if ((a.HasSecurityAttribute)) {
138                                 a.Error_InvalidSecurityParent ();
139                                 return;
140                         }
141
142                         if (a.Type == pa.Dynamic) {
143                                 a.Error_MisusedDynamicAttribute ();
144                                 return;
145                         }
146
147                         FieldBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), cdata);
148                 }
149
150                 protected override bool CheckBase ()
151                 {
152                         if (!base.CheckBase ())
153                                 return false;
154
155                         MemberSpec candidate;
156                         var conflict_symbol = MemberCache.FindBaseMember (this, out candidate);
157                         if (conflict_symbol == null)
158                                 conflict_symbol = candidate;
159
160                         if (conflict_symbol == null) {
161                                 if ((ModFlags & Modifiers.NEW) != 0) {
162                                         Report.Warning (109, 4, Location, "The member `{0}' does not hide an inherited member. The new keyword is not required",
163                                                 GetSignatureForError ());
164                                 }
165                         } else {
166                                 if ((ModFlags & (Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.BACKING_FIELD)) == 0) {
167                                         Report.SymbolRelatedToPreviousError (conflict_symbol);
168                                         Report.Warning (108, 2, Location, "`{0}' hides inherited member `{1}'. Use the new keyword if hiding was intended",
169                                                 GetSignatureForError (), conflict_symbol.GetSignatureForError ());
170                                 }
171
172                                 if (conflict_symbol.IsAbstract) {
173                                         Report.SymbolRelatedToPreviousError (conflict_symbol);
174                                         Report.Error (533, Location, "`{0}' hides inherited abstract member `{1}'",
175                                                 GetSignatureForError (), conflict_symbol.GetSignatureForError ());
176                                 }
177                         }
178  
179                         return true;
180                 }
181
182                 public virtual Constant ConvertInitializer (ResolveContext rc, Constant expr)
183                 {
184                         return expr.ConvertImplicitly (rc, MemberType);
185                 }
186
187                 protected override void DoMemberTypeDependentChecks ()
188                 {
189                         base.DoMemberTypeDependentChecks ();
190
191                         if (MemberType.IsGenericParameter)
192                                 return;
193
194                         if (MemberType.IsStatic)
195                                 Error_VariableOfStaticClass (Location, GetSignatureForError (), MemberType, Report);
196
197                         CheckBase ();
198                         IsTypePermitted ();
199                 }
200
201                 //
202                 //   Represents header string for documentation comment.
203                 //
204                 public override string DocCommentHeader {
205                         get { return "F:"; }
206                 }
207
208                 public override void Emit ()
209                 {
210                         if (member_type == InternalType.Dynamic) {
211                                 Compiler.PredefinedAttributes.Dynamic.EmitAttribute (FieldBuilder);
212                         } else if (!(Parent is CompilerGeneratedClass) && member_type.HasDynamicElement) {
213                                 Compiler.PredefinedAttributes.Dynamic.EmitAttribute (FieldBuilder, member_type);
214                         }
215
216                         if ((ModFlags & Modifiers.COMPILER_GENERATED) != 0 && !Parent.IsCompilerGenerated)
217                                 Compiler.PredefinedAttributes.CompilerGenerated.EmitAttribute (FieldBuilder);
218
219                         if (OptAttributes != null) {
220                                 OptAttributes.Emit ();
221                         }
222
223                         if (((status & Status.HAS_OFFSET) == 0) && (ModFlags & (Modifiers.STATIC | Modifiers.BACKING_FIELD)) == 0 && Parent.PartialContainer.HasExplicitLayout) {
224                                 Report.Error (625, Location, "`{0}': Instance field types marked with StructLayout(LayoutKind.Explicit) must have a FieldOffset attribute", GetSignatureForError ());
225                         }
226
227                         base.Emit ();
228                 }
229
230                 public static void Error_VariableOfStaticClass (Location loc, string variable_name, TypeSpec static_class, Report Report)
231                 {
232                         Report.SymbolRelatedToPreviousError (static_class);
233                         Report.Error (723, loc, "`{0}': cannot declare variables of static types",
234                                 variable_name);
235                 }
236
237                 protected override bool VerifyClsCompliance ()
238                 {
239                         if (!base.VerifyClsCompliance ())
240                                 return false;
241
242                         if (!MemberType.IsCLSCompliant () || this is FixedField) {
243                                 Report.Warning (3003, 1, Location, "Type of `{0}' is not CLS-compliant",
244                                         GetSignatureForError ());
245                         }
246                         return true;
247                 }
248         }
249
250         //
251         // Field specification
252         //
253         public class FieldSpec : MemberSpec, IInterfaceMemberSpec
254         {
255                 FieldInfo metaInfo;
256                 TypeSpec memberType;
257
258                 public FieldSpec (TypeSpec declaringType, IMemberDefinition definition, TypeSpec memberType, FieldInfo info, Modifiers modifiers)
259                         : base (MemberKind.Field, declaringType, definition, modifiers)
260                 {
261                         this.metaInfo = info;
262                         this.memberType = memberType;
263                 }
264
265                 #region Properties
266
267                 public bool IsReadOnly {
268                         get {
269                                 return (Modifiers & Modifiers.READONLY) != 0;
270                         }
271                 }
272
273                 public TypeSpec MemberType {
274                         get {
275                                 return memberType;
276                         }
277                 }
278
279 #endregion
280
281                 public FieldInfo GetMetaInfo ()
282                 {
283                         if ((state & StateFlags.PendingMetaInflate) != 0) {
284                                 var decl_meta = DeclaringType.GetMetaInfo ();
285                                 if (DeclaringType.IsTypeBuilder) {
286                                         metaInfo = TypeBuilder.GetField (decl_meta, metaInfo);
287                                 } else {
288                                         var orig_token = metaInfo.MetadataToken;
289                                         metaInfo = decl_meta.GetField (Name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
290                                         if (metaInfo.MetadataToken != orig_token)
291                                                 throw new NotImplementedException ("Resolved to wrong meta token");
292
293                                         // What a stupid API, does not work because field handle is imported
294                                         // metaInfo = FieldInfo.GetFieldFromHandle (metaInfo.FieldHandle, DeclaringType.MetaInfo.TypeHandle);
295                                 }
296
297                                 state &= ~StateFlags.PendingMetaInflate;
298                         }
299
300                         return metaInfo;
301                 }
302
303                 public override MemberSpec InflateMember (TypeParameterInflator inflator)
304                 {
305                         var fs = (FieldSpec) base.InflateMember (inflator);
306                         fs.memberType = inflator.Inflate (memberType);
307                         return fs;
308                 }
309
310                 public FieldSpec Mutate (TypeParameterMutator mutator)
311                 {
312                         var decl = DeclaringType;
313                         if (DeclaringType.IsGenericOrParentIsGeneric)
314                                 decl = mutator.Mutate (decl);
315
316                         if (decl == DeclaringType)
317                                 return this;
318
319                         var fs = (FieldSpec) MemberwiseClone ();
320                         fs.declaringType = decl;
321                         fs.state |= StateFlags.PendingMetaInflate;
322
323                         // Gets back FieldInfo in case of metaInfo was inflated
324                         fs.metaInfo = MemberCache.GetMember (TypeParameterMutator.GetMemberDeclaringType (DeclaringType), this).metaInfo;
325                         return fs;
326                 }
327         }
328
329         /// <summary>
330         /// Fixed buffer implementation
331         /// </summary>
332         public class FixedField : FieldBase
333         {
334                 public const string FixedElementName = "FixedElementField";
335                 static int GlobalCounter = 0;
336                 static object[] ctor_args = new object[] { (short)LayoutKind.Sequential };
337                 static FieldInfo[] fi;
338
339                 TypeBuilder fixed_buffer_type;
340
341                 const Modifiers AllowedModifiers =
342                         Modifiers.NEW |
343                         Modifiers.PUBLIC |
344                         Modifiers.PROTECTED |
345                         Modifiers.INTERNAL |
346                         Modifiers.PRIVATE |
347                         Modifiers.UNSAFE;
348
349                 public FixedField (DeclSpace parent, FullNamedExpression type, Modifiers mod, MemberName name, Attributes attrs)
350                         : base (parent, type, mod, AllowedModifiers, name, attrs)
351                 {
352                 }
353
354                 public override Constant ConvertInitializer (ResolveContext rc, Constant expr)
355                 {
356                         return expr.ImplicitConversionRequired (rc, TypeManager.int32_type, Location);
357                 }
358
359                 public override bool Define ()
360                 {
361                         if (!base.Define ())
362                                 return false;
363
364                         if (!TypeManager.IsPrimitiveType (MemberType)) {
365                                 Report.Error (1663, Location,
366                                         "`{0}': Fixed size buffers type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float or double",
367                                         GetSignatureForError ());
368                         } else if (declarators != null) {
369                                 var t = new TypeExpression (MemberType, TypeExpression.Location);
370                                 int index = Parent.PartialContainer.Fields.IndexOf (this);
371                                 foreach (var d in declarators) {
372                                         var f = new FixedField (Parent, t, ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
373                                         f.initializer = d.Initializer;
374                                         ((ConstInitializer) f.initializer).Name = d.Name.Value;
375                                         Parent.PartialContainer.Fields.Insert (++index, f);
376                                 }
377                         }
378                         
379                         // Create nested fixed buffer container
380                         string name = String.Format ("<{0}>__FixedBuffer{1}", Name, GlobalCounter++);
381                         fixed_buffer_type = Parent.TypeBuilder.DefineNestedType (name, Parent.Module.DefaultCharSetType |
382                                 TypeAttributes.NestedPublic | TypeAttributes.Sealed | TypeAttributes.BeforeFieldInit, TypeManager.value_type.GetMetaInfo ());
383
384                         fixed_buffer_type.DefineField (FixedElementName, MemberType.GetMetaInfo (), FieldAttributes.Public);
385                         RootContext.RegisterCompilerGeneratedType (fixed_buffer_type);
386                         
387                         FieldBuilder = Parent.TypeBuilder.DefineField (Name, fixed_buffer_type, ModifiersExtensions.FieldAttr (ModFlags));
388                         var element_spec = new FieldSpec (null, this, MemberType, FieldBuilder, ModFlags);
389                         spec = new FixedFieldSpec (Parent.Definition, this, FieldBuilder, element_spec, ModFlags);
390
391                         Parent.MemberCache.AddMember (spec);
392                         return true;
393                 }
394
395                 protected override void DoMemberTypeIndependentChecks ()
396                 {
397                         base.DoMemberTypeIndependentChecks ();
398
399                         if (!IsUnsafe)
400                                 Expression.UnsafeError (Report, Location);
401
402                         if (Parent.PartialContainer.Kind != MemberKind.Struct) {
403                                 Report.Error (1642, Location, "`{0}': Fixed size buffer fields may only be members of structs",
404                                         GetSignatureForError ());
405                         }
406                 }
407
408                 public override void Emit()
409                 {
410                         ResolveContext rc = new ResolveContext (this);
411                         IntConstant buffer_size_const = initializer.Resolve (rc) as IntConstant;
412                         if (buffer_size_const == null)
413                                 return;
414
415                         int buffer_size = buffer_size_const.Value;
416
417                         if (buffer_size <= 0) {
418                                 Report.Error (1665, Location, "`{0}': Fixed size buffers must have a length greater than zero", GetSignatureForError ());
419                                 return;
420                         }
421
422                         int type_size = Expression.GetTypeSize (MemberType);
423
424                         if (buffer_size > int.MaxValue / type_size) {
425                                 Report.Error (1664, Location, "Fixed size buffer `{0}' of length `{1}' and type `{2}' exceeded 2^31 limit",
426                                         GetSignatureForError (), buffer_size.ToString (), TypeManager.CSharpName (MemberType));
427                                 return;
428                         }
429
430                         buffer_size *= type_size;
431                         EmitFieldSize (buffer_size);
432
433                         Compiler.PredefinedAttributes.UnsafeValueType.EmitAttribute (fixed_buffer_type);
434
435                         base.Emit ();
436                 }
437
438                 void EmitFieldSize (int buffer_size)
439                 {
440                         CustomAttributeBuilder cab;
441                         PredefinedAttribute pa;
442
443                         pa = Compiler.PredefinedAttributes.StructLayout;
444                         if (pa.Constructor == null &&
445                                 !pa.ResolveConstructor (Location, TypeManager.short_type))
446                                         return;
447
448                         // TODO: It's not cleared
449                         if (fi == null) {
450                                 var field = (FieldSpec) MemberCache.FindMember (pa.Type, MemberFilter.Field ("Size", null), BindingRestriction.DeclaredOnly);
451                                 fi = new FieldInfo[] { field.GetMetaInfo () };
452                         }
453
454                         object[] fi_val = new object[] { buffer_size };
455                         cab = new CustomAttributeBuilder (pa.Constructor,
456                                 ctor_args, fi, fi_val);
457                         fixed_buffer_type.SetCustomAttribute (cab);
458                         
459                         //
460                         // Don't emit FixedBufferAttribute attribute for private types
461                         //
462                         if ((ModFlags & Modifiers.PRIVATE) != 0)
463                                 return;
464
465                         pa = Compiler.PredefinedAttributes.FixedBuffer;
466                         if (pa.Constructor == null &&
467                                 !pa.ResolveConstructor (Location, TypeManager.type_type, TypeManager.int32_type))
468                                 return;
469
470                         cab = new CustomAttributeBuilder (pa.Constructor, new object[] { MemberType.GetMetaInfo (), buffer_size });
471                         FieldBuilder.SetCustomAttribute (cab);
472                 }
473
474                 public void SetCharSet (TypeAttributes ta)
475                 {
476                         TypeAttributes cta = fixed_buffer_type.Attributes;
477                         if ((cta & TypeAttributes.UnicodeClass) != (ta & TypeAttributes.UnicodeClass))
478                                 SetTypeBuilderCharSet ((cta & ~TypeAttributes.AutoClass) | TypeAttributes.UnicodeClass);
479                         else if ((cta & TypeAttributes.AutoClass) != (ta & TypeAttributes.AutoClass))
480                                 SetTypeBuilderCharSet ((cta & ~TypeAttributes.UnicodeClass) | TypeAttributes.AutoClass);
481                         else if (cta == 0 && ta != 0)
482                                 SetTypeBuilderCharSet (cta & ~(TypeAttributes.UnicodeClass | TypeAttributes.AutoClass));
483                 }
484
485                 void SetTypeBuilderCharSet (TypeAttributes ta)
486                 {
487                         MethodInfo mi = typeof (TypeBuilder).GetMethod ("SetCharSet", BindingFlags.Instance | BindingFlags.NonPublic);
488                         if (mi == null) {
489                                 Report.RuntimeMissingSupport (Location, "TypeBuilder::SetCharSet");
490                         } else {
491                                 mi.Invoke (fixed_buffer_type, new object [] { ta });
492                         }
493                 }
494         }
495
496         class FixedFieldSpec : FieldSpec
497         {
498                 readonly FieldSpec element;
499
500                 public FixedFieldSpec (TypeSpec declaringType, IMemberDefinition definition, FieldInfo info, FieldSpec element, Modifiers modifiers)
501                         : base (declaringType, definition, element.MemberType, info, modifiers)
502                 {
503                         this.element = element;
504
505                         // It's never CLS-Compliant
506                         state &= ~StateFlags.CLSCompliant_Undetected;
507                 }
508
509                 public FieldSpec Element {
510                         get {
511                                 return element;
512                         }
513                 }
514
515                 public TypeSpec ElementType {
516                         get {
517                                 return MemberType;
518                         }
519                 }
520         }
521
522         //
523         // The Field class is used to represents class/struct fields during parsing.
524         //
525         public class Field : FieldBase {
526                 // <summary>
527                 //   Modifiers allowed in a class declaration
528                 // </summary>
529                 const Modifiers AllowedModifiers =
530                         Modifiers.NEW |
531                         Modifiers.PUBLIC |
532                         Modifiers.PROTECTED |
533                         Modifiers.INTERNAL |
534                         Modifiers.PRIVATE |
535                         Modifiers.STATIC |
536                         Modifiers.VOLATILE |
537                         Modifiers.UNSAFE |
538                         Modifiers.READONLY;
539
540                 public Field (DeclSpace parent, FullNamedExpression type, Modifiers mod, MemberName name,
541                               Attributes attrs)
542                         : base (parent, type, mod, AllowedModifiers, name, attrs)
543                 {
544                 }
545
546                 bool CanBeVolatile ()
547                 {
548                         if (TypeManager.IsReferenceType (MemberType))
549                                 return true;
550
551                         if (MemberType == TypeManager.bool_type || MemberType == TypeManager.char_type ||
552                                 MemberType == TypeManager.sbyte_type || MemberType == TypeManager.byte_type ||
553                                 MemberType == TypeManager.short_type || MemberType == TypeManager.ushort_type ||
554                                 MemberType == TypeManager.int32_type || MemberType == TypeManager.uint32_type ||
555                                 MemberType == TypeManager.float_type ||
556                                 MemberType == TypeManager.intptr_type || MemberType == TypeManager.uintptr_type)
557                                 return true;
558
559                         if (MemberType.IsEnum)
560                                 return true;
561
562                         return false;
563                 }
564
565                 public override bool Define ()
566                 {
567                         if (!base.Define ())
568                                 return false;
569
570                         Type[] required_modifier = null;
571                         if ((ModFlags & Modifiers.VOLATILE) != 0) {
572                                 if (TypeManager.isvolatile_type == null)
573                                         TypeManager.isvolatile_type = TypeManager.CoreLookupType (Compiler,
574                                                 "System.Runtime.CompilerServices", "IsVolatile", MemberKind.Class, true);
575
576                                 if (TypeManager.isvolatile_type != null)
577                                         required_modifier = new Type[] { TypeManager.isvolatile_type.GetMetaInfo () };
578                         }
579
580                         FieldBuilder = Parent.TypeBuilder.DefineField (
581                                 Name, member_type.GetMetaInfo (), required_modifier, null, ModifiersExtensions.FieldAttr (ModFlags));
582
583                         spec = new FieldSpec (Parent.Definition, this, MemberType, FieldBuilder, ModFlags);
584
585                         // Don't cache inaccessible fields
586                         if ((ModFlags & Modifiers.BACKING_FIELD) == 0) {
587                                 Parent.MemberCache.AddMember (spec);
588                         }
589
590                         if (initializer != null) {
591                                 ((TypeContainer) Parent).RegisterFieldForInitialization (this,
592                                         new FieldInitializer (spec, initializer, this));
593                         }
594
595                         if (declarators != null) {
596                                 var t = new TypeExpression (MemberType, TypeExpression.Location);
597                                 int index = Parent.PartialContainer.Fields.IndexOf (this);
598                                 foreach (var d in declarators) {
599                                         var f = new Field (Parent, t, ModFlags, new MemberName (d.Name.Value, d.Name.Location), OptAttributes);
600                                         if (d.Initializer != null)
601                                                 f.initializer = d.Initializer;
602
603                                         Parent.PartialContainer.Fields.Insert (++index, f);
604                                 }
605                         }
606
607                         return true;
608                 }
609
610                 protected override void DoMemberTypeDependentChecks ()
611                 {
612                         if ((ModFlags & Modifiers.BACKING_FIELD) != 0)
613                                 return;
614
615                         base.DoMemberTypeDependentChecks ();
616
617                         if ((ModFlags & Modifiers.VOLATILE) != 0) {
618                                 if (!CanBeVolatile ()) {
619                                         Report.Error (677, Location, "`{0}': A volatile field cannot be of the type `{1}'",
620                                                 GetSignatureForError (), TypeManager.CSharpName (MemberType));
621                                 }
622
623                                 if ((ModFlags & Modifiers.READONLY) != 0) {
624                                         Report.Error (678, Location, "`{0}': A field cannot be both volatile and readonly",
625                                                 GetSignatureForError ());
626                                 }
627                         }
628                 }
629
630                 protected override bool VerifyClsCompliance ()
631                 {
632                         if (!base.VerifyClsCompliance ())
633                                 return false;
634
635                         if ((ModFlags & Modifiers.VOLATILE) != 0) {
636                                 Report.Warning (3026, 1, Location, "CLS-compliant field `{0}' cannot be volatile", GetSignatureForError ());
637                         }
638
639                         return true;
640                 }
641         }
642 }