2005-04-13 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / mcs / ChangeLog
index 238642c190a705479e240c2484aade4bc0ac2e02..7ea9c2aa33371588feaf37c7499e3763bb7e625a 100644 (file)
@@ -1,5 +1,323 @@
+2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * doc.cs : detect ambiguous reference to overloaded members.
+         Fixed bug #71603. MS 1.1 csc does not detect it.
+
+2005-04-13  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * doc.cs : delegates must not be referenced with parameters.
+         Fixed bug #71605.
+
+2005-04-12  Miguel de Icaza  <miguel@novell.com>
+
+       * typemanager.cs (IsUnmanagedType): Arrays are allowed.
+
+2005-04-11  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix# 74565
+       * class.cs (TypeContainer.CircularDepException) New nested
+       exception class.
+       (GetPartialBases, GetNormalBases, GetClassBases): Removed error.
+       (TypeContainer.DefineType): Removed error, reset InTransit before
+       exit.
+       (Class.DefineType): Throw exception when is in Transit.
+       Catch exception and report error.
+       (Struct.DefineType): Throw exception when is in Transit.
+       Catch exception and report error.
+       (Interface.DefineType): Throw exception when is in Transit.
+       Catch exception and report error.
+       
+       * codegen.cs: Add InCatch,InFinally to EmitContext to easily
+       handle nested exception handlers.
+
+       * flowanalysis.cs (InTryWithCatch): New method, search for try with
+       a catch.
+       
+       * iterators.cs (Yield.CheckContext): Add CS1626 report. Updated
+       InFinally and InCatch storage.
+       
+       * statement.cs (Throw.Resolve): Use InCatch, InFinally from ec.
+       (Catch.Resolve): Set and Restore ec.InCatch.
+       (Try.Resolve): Set and Restore ec.InFinally.
+       (Try.HasCatch): True when try has catch.
+
+2005-04-10  Miguel de Icaza  <miguel@novell.com>
+
+       * driver.cs (MainDriver): Stop processing if the CLS stage found
+       errors. 
+
+       (CompilerCallableEntryPoint.InvokeCompiler): Always
+       reset after execution;   Take a TextWriter argument for the
+       output.
+
+       * report.cs: Use the error stream instead of hardcoding stderr. 
+
+2005-04-09  Miguel de Icaza  <miguel@novell.com>
+
+       * class.cs: Reduce code paths to test, too small of an
+       optimization to make it worth the extra testing.  Always perform
+       it. 
+
+2005-04-08  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #74510.
+       * class.cs (OperatorArrayList.CheckPairedOperators): Skip
+       operators that had errors reported on them.
+
+2005-04-08  Marek Safar  <marek.safar@seznam.cz>
+
+       * attribute.cs (Attribute.IsValidArgumentType): Test valid named
+       argument types.
+       (Attribute.Resolve): Add named argument type checking.
+       
+       * class.cs (FixedField.Define): Use IsPrimitiveType
+       
+       * expression.cs (Binary.ResolveOperator): Reflect IsCLRType renaming.
+       
+       * iterators.cs (Iterator.DefineIterator): Add check for arglist and
+       unsafe parameter types.
+       
+       * statement.cs (Using.ResolveExpression): Add better error description.
+       
+       * typemanager.cs (IsCLRType): Renamed to IsPrimitiveType.
+       
+2005-04-08  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #74484.
+       * attribute.cs (Attribute.GetAttributeUsage): Resolve
+       AttributeUsageAttribute in the emitcontext of the attribute class,
+       not in the emitcontext of the attributable entity it was attached to.
+       * cs-parser.jay: Use 'current_class', not 'current_container',
+       when creating a GlobalAttribute.
+
+2005-04-08  Alp Toker  <alp@atoker.com>
+
+       * pending.cs: The fix to #58413 failed to compile methods implementing
+       interfaces with/without params modifiers and vice versa, even though
+       params modifiers aren't part of the signature. Make the modifier check
+       less strict as in csc.
+
+2005-04-07  Abin Thomas  <projectmonokochi@rediffmail.com>
+           Anoob V E  <projectmonokochi@rediffmail.com>
+           Harilal P R  <projectmonokochi@rediffmail.com>
+
+       Fix #58413.
+       * pending.cs (TypeAndMethods.mods): New.  Store the parameter
+       modifiers of pending methods.
+       (PendingImplementation.PendingImplementation): Initialize it.
+       Add Parameter.Modifier [][] mods and initialize it with ParameterData.
+       (PendingImplementation.InterFaceMethod): Repalce Type[] argument
+       with ParameterData.  Add check for modifiers.
+       * class.cs (MethodData.Define): Update to changes.
+
+2005-04-07  Raja R Harinath  <rharinath@novell.com>
+
+       * ecore.cs (Expression.IsAccessorAccessible): Clarify code somewhat.
+
+2005-04-07  Marek Safar  <marek.safar@seznam.cz>
+
+       * class.cs (PropertyMethod.Define): Check private accessor in abstract
+       property.
+       
+       * decl.cs (DeclSpace.ApplyAttributeBuilder): Don't allow RequiredAttribute
+       
+       * rootcontext.cs,
+       * typemanager.cs: Registered RequiredAttributeAttribute.
+       
+2005-04-06  Marek Safar  <marek.safar@seznam.cz>
+
+       * class.cs (VerifyMembers): Doesn't need EmitContext argument.
+       Warning CS0169 is back at level 3.
+       (IMethodData.SetMemberIsUsed): New method.
+       
+       * decl.cs (IsUsed): New value; moved from FieldBase.Status
+       (SetMemberIsUsed, IsUsed): New methods, encapsulate IsUsed.
+       
+       * delegate.cs (ResolveMethodGroupExpr): Call SetMemberIsUsed.
+
+       * ecore.cs (FieldExpr.ResolveMemberAccess): Call SetMemberIsUsed for
+       contants.
+       (PropertyExpr.ResolveAccessors): Call SetMemberIsUsed when delegate
+       is used.
+       
+       * expression.cs (OverloadResolve): Call SetMemberIsUsed. when method
+       is used.
+       
+       * rootcontext.cs (RootContext.EmitCode): Call VerifyMembers in extra run
+       to avoid the problems with nested types.
+
+2005-04-05  Abin Thomas         <projectmonokochi@rediffmail.com>
+           Anoob V.E  <projectmonokochi@rediffmail.com>
+           Harilal P.R  <projectmonokochi@rediffmail.com>
+           Raja R Harinath  <rharinath@novell.com>
+
+       Fix #73820.
+       * delegate.cs (Define): Emit ParamArrayAttribute for 'params'
+       attribute.
+       * typemanager (GetConstructor): Make public.
+
+2005-04-05  John Luke  <john.luke@gmail.com>
+           Raja R Harinath  <rharinath@novell.com>
+
+       Fix #62232.
+       * typemanager.cs (IsUnmanagedType): Check non-public fields of a
+       struct too.  Return false quicker in a few cases.
+       (VerifyUnManaged): Use it.
+
+2005-04-05  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #74041.
+       * statement.cs (Block.Resolve): Initialize 'unreachable' to false,
+       not 'unreachable_seen'.
+
+2005-04-04  Marek Safar  <marek.safar@seznam.cz>
+
+       * attribute.cs (Attribute.GetValue): Removed unused.
+       
+       * codegen.cs (CodeGen.TrimExt): Removed unused.
+       
+       * cs-parser.jay (output): Removed unused.
+       
+       * cs-tokenizer.cs (hex_digits): Removed unused.
+       
+       * enum.cs (MapToInternalType, GetEnumeratorName): Removed unused.
+       
+       * expression.cs (Indirection.LoadExprValue): Removed unused.
+       (ArrayCreation.ExpressionToArrayArgument): Removed unused.
+       
+       * iterators.cs (Iterator.param_types): Removed unused.
+       
+       * statement.cs (Goto.block): Removed unused.
+       (ToplevelBlock.did): Removed unused.
+       (Switch.ResolveConstantSwitch): Removed unused.
+
+2005-04-01  Ben Maurer  <bmaurer@ximian.com>
+
+       * rootcontext.cs: Allow mcs to bootstrap with the compilation
+       resetting thingy.
+
+2005-04-01  Raja R Harinath  <rharinath@novell.com>
+
+       Fix #74232 and cs0208-3.cs.
+       * expression.cs (ComposedCast.DoResolveAsTypeStep): Add CS0208 check.
+       * typemanager.cs (IsUnmanagedType): Don't allow 'object' as an
+       unmanaged type.  Don't use FieldBuilders when 't' is a
+       TypeBuilder.  Use ModFlags and MemberType fields.
+       * class.cs (MemberBase.member_type): Rename from MemberType.
+       (MemberBase.MemberType): New property.  Determines member_type on
+       demand.
+       (MemberBase.DoDefine): Don't initialize MemberType here.
+       (FieldMember.Define): Likewise.
+
+2005-04-01  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix #74241
+       * class.cs (Event.Emit): Call Add/Remove emit even for interfaces.
+       Attributes are emitted there.
+       
+2005-04-01  Raja R Harinath  <rharinath@novell.com>
+
+       * cs-tokenizer.cs (consume_identifier): Treat 'partial' as a
+       keyword in 'partial enum' too.
+       * cs-parser.jay (enum_declaration): Add CS0267 check ('partial enum'
+       is not allowed).
+       Report from Kamil Skalski <nazgul@omega.pl>.
+
+       Fix #74309.
+       * rootcontext.cs (ResolveTree): The 'root.Interfaces' list can
+       have partial containers too.
+
+       * ecore.cs (SimpleName.SimpleNameResolve): Move 'invariant meaning
+       in block' checks to Block.CheckInvariantMeaningInBlock.
+       * statement.cs (Block.GetKnownVariableInfo): Make private.
+       (Block.IsVariableUsedInChildBlock): Remove.
+       (Block.IsVariableUsedInBlock): Likewise.
+       (Block.CheckInvariantMeaningInBlock): New.  Show location of
+       conflicting declaration.
+       (Block.AddVariable): Make error messages less long-winded and more
+       specific.  Show location of conflicting declaration.
+       * parameter.cs (Parameters.Location): New readonly property.
+
+2005-03-31  Raja R Harinath  <rharinath@novell.com>
+
+       Clean up semantics of invoking ResolveMemberAccess.
+       * ecore.cs (SimpleName.DoSimpleNameResolve): If a MemberExpression
+       can have an instance, ensure that we pass in a non-TypeExpression
+       to ResolveMemberAccess.  Tighten up IdenticalNameAndTypeName checks.
+       (MemberExpr.DoSimpleNameResolve): Remove type_is_inferred
+       argument.  Update to changes and simplify.
+       (FieldExpr.Emitinstance): Remove CS0120 check.
+       (PropertyExpr.EmitInstance): Likewise.
+       * expression.cs (Argument.Resolve): Likewise.
+       (Invocation.DoResolve): Update to changes in semantics of
+       InstanceExpression.
+
+2005-03-31  Marek Safar  <marek.safar@seznam.cz>
+
+       Fix #74241
+       * class.cs (AbstractPropertyEventMethod.EmitMethod): Enable emit method
+       customization.
+       
+       * decl.cs (MemberCache.AddMethods): Fix infinite loop.
+
+2005-03-31  Raja R Harinath  <rharinath@novell.com>
+
+       Fix difference in behaviour with commandline invocation.
+       * driver.cs (Driver.Reset): New.
+       (CompilerCallableEntryPoint): Call it.
+
+       * statement.cs (If.Resolve): Avoid spurious "uninitialized
+       variable" warnings if the boolean expression failed to resolve.
+
+2005-03-30  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * attribute.cs: Fix the union of several permissions when some of them
+       are unrestricted (so the result isn't an unrestricted permission set).
+       Fix #74036.
+
+2005-03-30  Raja R Harinath  <rharinath@novell.com>
+
+       * ecore.cs (MemberExpr): New class.  Convert from interface
+       IMemberExpr.
+       (MemberExpr.ResolveMemberAccess): Refactor and move here from
+       MemberAccess.ResolveMemberAccess.  Tighten up pre-conditions and
+       error checks.
+       (MethodGroupExpr, FieldExpr, PropertyExpr, EventExpr): Update.
+       (MethodGroupExpr.IsExplicitImpl): Remove.
+       (Expression.GetFieldFromEvent): Remove.
+       (SimpleName.MemberStaticCheck): Remove.
+       (SimpleName.DoSimpleNameResolve): Update to changes.
+       * expression.cs (MemberAccess.ResolveMemberAccess): Refactor.
+       (MemberAccess.IdenticalNameAndTypeName): Remove.
+       (MemberAccess.error176): Move to MemberExpr.
+       (MemberAccess.DoResolve): Update to changes.
+       (BaseAccess.DoResolve): Likewise.
+
+2005-03-30  Marek Safar  <marek.safar@seznam.cz>
+
+       C# 2.0 Conditional attribute class implementation
+       
+       * attribute.cs (AttributeTester.IsAttributeExcluded): New method.
+       Analyzes class whether it has attribute which has ConditionalAttribute
+       and its condition is not defined.
+       
+       * class.cs (Class.ApplyAttributeBuilder): Add IsAttributeExcluded check.
+       (Class.IsExcluded): New method. Search for at least one defined
+       condition in ConditionalAttribute of attribute class.
+
+2005-03-30  Raja R Harinath  <rharinath@novell.com>
+
+       * ecore.cs (PropertyExpr): Derive from Expression, not
+       ExpressionStatement.
+       (PropertyExpr.EmitStatement): Remove.
+
 2005-03-29  Raja R Harinath  <rharinath@novell.com>
 
+       Fix #74060.
+       * expression.cs (MemberAccess.ResolveMemberAccess): Allow the
+       internal field "value__" of an enum be private.  The examples for
+       "value__" that I found on MSDN all used FieldAttributes.Private.
+
        * decl.cs (MemberCache.AddMethods): Use C# terminology in warning.
        Don't mention IL method attribute names.
 
 
 2005-03-15  Marek Safar  <marek.safar@seznam.cz>
 
-       * class.cs (TypeContainer.CircularDepException) New nested
-       (MethodCore.CheckBase): Report CS1715 for properties and indexers.
+       * class.cs (MethodCore.CheckBase): Report CS1715 for properties and
+       indexers.
 
        * cs-parser.jay: Reports CS1527 for any namespace element.