byte array for unsigned "baked" assemblies.
* gcs0281.cs: Modified expected error message now that fix for bug
#315057 has been applied.
svn path=/trunk/mcs/; revision=92330
* mcs/ecore.cs (SimpleName.DoSimpleNameResolve): Handle Property and
Event accessibility checks here. Remove some bogus code that
accidently made GenericMethods work.
(PropertyExpr.IsAccessibleFrom, EventExpr.IsAccessibleFrom): New.
* tests/test-589.cs: Additional test for #328490.
* errors/cs0120-10.cs: New test based on #328490.
svn path=/trunk/mcs/; revision=86807
* doc.cs : catch other types of exception than XmlException to
report CS1570. Fixed bug #82565.
* cs1570-12.cs : new test (bug #82565).
svn path=/trunk/mcs/; revision=84780
* mcs/statement.cs (ToplevelBlock.ProcessParameters): Add parameter
names to the "known" variables list.
(Block.CheckInvariantMeaningInBlock): Handle the fact the
parameter names are also "known".
(Block.CheckError136): Remove.
(ExplicitBlock.CloneTo): New. Set 'known_variables' in target to null.
* errors/cs0135-2.cs, errors/cs0135-3.cs: New tests for parameter name
conflicts.
svn path=/trunk/mcs/; revision=78855
Revert r77431, and remove ChangeLog corruption introduced in
r77445
In errors:
Add new regression tests, and mark cs0158-5.cs as broken due
to the revert above.
I decided to break cs0158-5.cs and revert rather than fix the issues since
a correct fix will be very similar to what I'm planning to do for shadowed
variables (invariant meaning in a block).
svn path=/trunk/mcs/; revision=77549
compiling for Linq.
gmcs/cs-parser.jay: Improved grammar for object and collection
initialization.
mcs/assing.cs:
mcs/expression.cs: Improved object and collection initialization.
tests/gtest-initialize-02.cs: Added an uber-test for object and
collection initialization.
svn path=/trunk/mcs/; revision=77514
Fix regression in cs0631-3.cs
* cs-parser.jay (operator_declarator): Add opt_attributes to error
fallback. Make error fallback catch more cases.
In gmcs:
Fix regression in cs0631-3.cs
* cs-parser.jay (operator_declarator): Add opt_attributes to error
fallback. Make error fallback catch more cases.
In errors:
* cs1534-2.cs: New test. Ensure that the error handling isn't
limited to only erroneous 3-argument operators.
svn path=/trunk/mcs/; revision=76555
* mcs/statement.cs (For.Resolve): If resolution fails, use KillFlowBranching.
* errors/cs0103-5.cs: New test based on #81338.
svn path=/trunk/mcs/; revision=75536
In mcs :
* class.cs:
Added 2 MemberCoreArrayList objects, ordered_explicit_member_list and
ordered_member_list, to TypeBuilder to store members to be defined
in the order they were parsed in.
- ordered_explicit_member_list contains all properties indexers
and methods that are defined as explicit implementation of an
interface or base class.
- ordered_member_list contains all properties indexers and methods
that are not defined as explicit implementation of an interface
or base class.
Removed MethodArrayList and IndexerArrayList from TypeBuilder. The
functionality in these removed classes has been replaced with
ComputeIndexerName, EmitIndexerName, HasEqualss, HasGetHashCode, and
CheckEqualsAndGetHashCode members defined and called in the TypeBuilderClass.
Adding CheckForDuplications to PropertyBase.PropertyMethod and calls
to CheckForDuplications inside GetMethod and SetMethod Define Method
to handle method property and indexer name conflicts.
In errors :
* gcs0111-2.cs:
With the new member ordering change in class.cs, the error message
for this test has changed and now matches csc output.
Fixes#79434
All code is contributed under the MIT/X11 license.
svn path=/trunk/mcs/; revision=74749
* cs3005-15.cs
With the changes to mcs/class.cs in r74702 these test
outputs are now different. The error messages are still correct
they are simply reporting the error on the other name due to the
new order objects are processed.
svn path=/trunk/mcs/; revision=74745
Fix#80534, gtest-309.cs
* generic.cs (UnifyType): Rename from InferType. Make unification
of generic insts simpler and don't insist on inferring all generic
parameters in a single generic inst unification.
(UnifyTypes): New.
(InferGenericInstance): Remove.
Analysis and initial patch by David Mitchell <[email protected]>.
In tests:
* gtest-309.cs: Renamed from errors/gcs0411-3.cs.
* gtest-310.cs: New test from #80534.
In errors:
* gcs0411-3.cs: Rename to tests/gtest-309.cs.
svn path=/trunk/mcs/; revision=71817
* mcs/ecore.cs (PropertyExpr.InstanceResolve): Always resolve the
instance as an rvalue, even when we later resolve as an lvalue.
* errors/cs0165-13.cs: New test from #78820.
svn path=/trunk/mcs/; revision=66967
* mcs/class.cs (DefineTypeBuilder): Check circular dependencies before
setting the parent of the TypeBuilder.
(CheckRecursiveDefinition): Don't use 'BaseType', since
it may not be valid until after DefineTypeBuilder. Use
'base_type' instead.
* errors/cs0146-5.cs: New test from #79584.
svn path=/trunk/mcs/; revision=66334
Fix#79013
* convert.cs (Convert.ImplicitStandardConversionExists): Avoid infloop.
* expression.cs (EmptyExpression.Grab, EmptyExpression.Release):
Change semantics slightly. Don't insist on having only one
temporary EmptyExpression -- just throttle the creation of new ones.
In tests:
* gtest-291.cs: New test from #79013.
In errors:
* gcs1502.cs: New test from #79013.
svn path=/trunk/mcs/; revision=66062
Fix#79451
* ecore.cs (Expression.MemberLookup): Enable CS0229 errors for
non-interfaces too. If no methods are found, don't try to create
a MethodGroupExpr.
In errors:
* cs0229-3.cs, CS0229-3-lib.il: New test based on #79451.
* cs0229-4.cs, CS0229-4-lib.il: Likewise.
svn path=/trunk/mcs/; revision=66023
Fix#79067
* cs-tokenizer.cs (parse_less_than): Allow '*' to appear in a type
parameter too. This only avoids a parse error -- the semantic
error is caught elsewhere.
In errors:
* gcs0306.cs: New test based on #79067.
svn path=/trunk/mcs/; revision=63715
Fix cs0146-3.cs and cs0146-4.cs.
* class.cs (TypeManager.CheckRecursiveDefinition): Check that
enclosing types don't depend on the current type.
In errors:
* cs0146-3.cs, cs0146-4.cs: New tests for bug discovered while
fixing #77963.
svn path=/trunk/mcs/; revision=63286
* mcs/expression.cs (Binary.CheckShiftArguments): Don't overwrite original
'left' and 'right' before error-checking.
* gmcs/expression.cs: Likewise.
* errors/cs0019-16.cs: New test from #78662.
svn path=/trunk/mcs/; revision=61898
* flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
unreachable, skip it.
(FlowBranchingException.Merge): Always propagate jumps, even if
the finally block renders subsequent code unreachable.
In gmcs:
* flowanalysis.cs (UsageVector.MergeOrigins): If an origin is
unreachable, skip it.
(FlowBranchingException.Merge): Always propagate jumps, even if
the finally block renders subsequent code unreachable.
In tests:
* test-519.cs: New test for compiler crash.
In errors:
* cs0139-3.cs, cs0139-4.cs, cs0139-5.cs, cs0139-6.cs: New
regression tests for 'break' and 'continue' inside a try block.
svn path=/trunk/mcs/; revision=60987
In mcs:
Fix#77869, #76148, #77755, #75255 and a host of other bugs.
This is still "wrong", but anything better would probably need a
multi-pass algorithm.
* flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
usage vector. Force current usage vector to be reachable, to
optimistically signify backward jumps.
(FlowBranchingLabeled.LookupLabel): Note if a backward jump is
detected.
(FlowBranchingLabeled.Merge): New. If no backward jump was
detected, return the original salted-away usage vector instead,
updated with appropriate changes. Print unreachable warning if
necessary.
* statement.cs (Block.Resolve): Don't print unreachable warning on
a labeled statement.
In gmcs:
Fix#77869, #76148, #77755, #75255 and a host of other bugs.
This is still "wrong", but anything better would probably need a
multi-pass algorithm.
* flowanalysis.cs (FlowBranchingLabeled): Salt away a copy of the
usage vector. Force current usage vector to be reachable, to
optimistically signify backward jumps.
(FlowBranchingLabeled.LookupLabel): Note if a backward jump is
detected.
(FlowBranchingLabeled.Merge): New. If no backward jump was
detected, return the original salted-away usage vector instead,
updated with appropriate changes. Print unreachable warning if
necessary.
* statement.cs (Block.Resolve): Don't print unreachable warning on
a labeled statement.
In tests:
* test-514.cs: New test from #76148.
* test-515.cs, test-516.cs: New tests based on #77755.
* test-517.cs: New test based on #75255.
In errors:
* cs0162-6.cs, cs0162-7.cs: New tests for unreachable code.
Emitting the warning on cs0162-7.cs needs a multi-pass algorithm.
* cs0165-12.cs: New test from #77869.
svn path=/trunk/mcs/; revision=60813
* flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
(FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
(FlowBranchingException.Label): Likewise.
In gmcs:
* flowanalysis.cs (UsageVector.MergeJumpOrigins): Kill.
(FlowBranchingBlock.Label): Use UsageVector.MergeOrigins.
(FlowBranchingException.Label): Likewise.
In tests:
* test-154.cs (test39): Move buggy testcase to errors/cs0177-7.cs.
Fix it and move ...
* test-510.cs: ... here.
In errors:
* cs0177-7.cs: Taken from erroneous sub-test in tests/test-154.cs.
svn path=/trunk/mcs/; revision=60584
Fix#78290
* statement.cs (Return.Resolve): Move error checking to ...
* flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
(FlowBranchingException): Handle return origins like break and
continue origins.
(FlowBranching.UsageVector.CheckOutParameters): Remove.
In gmcs:
Fix#78290
* statement.cs (Return.Resolve): Move error checking to ...
* flowbranching.cs (FlowBranching.AddReturnOrigin): ... this.
(FlowBranchingException): Handle return origins like break and
continue origins.
(FlowBranching.UsageVector.CheckOutParameters): Remove.
In tests:
* test-508.cs: New test -- didn't fail earlier, but include to
catch any regressions.
In errors:
* cs0177-5.cs, cs0177-6.cs: New tests based on #78290.
svn path=/trunk/mcs/; revision=60279
Fix#76471, #76665
* flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
(FlowBranching.CreateBranching): Handle it: create a
FlowBranchingContinuable.
(FlowBranching.BreakCrossesExceptionBoundary): Remove.
(FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
except that it handles the 'continue' command.
(FlowBranching.UsageVector.MergeOrigins): Rename from
MergeBreakOrigins.
(FlowBranchingContinuable): Similar to FlowBranchingBreakable,
except that it overrides AddContinueOrigin.
(FlowBranchingException): Override AddContinueOrigin, similar to
AddBreakOrigin.
* statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
Create a new branching around the embedded statement.
(Do.Resolve, For.Resolve): Likewise. Do reachability analysis for
control flow after the embedded statement.
(Continue.Resolve): Move all error checking to AddContinueOrigin.
In gmcs:
Fix#76471, #76665
* flowanalysis.cs (FlowBranching.BranchingType.Embedded): New.
(FlowBranching.CreateBranching): Handle it: create a
FlowBranchingContinuable.
(FlowBranching.BreakCrossesExceptionBoundary): Remove.
(FlowBranching.AddContinueOrigin): Similar to AddBreakOrigin,
except that it handles the 'continue' command.
(FlowBranching.UsageVector.MergeOrigins): Rename from
MergeBreakOrigins.
(FlowBranchingContinuable): Similar to FlowBranchingBreakable,
except that it overrides AddContinueOrigin.
(FlowBranchingException): Override AddContinueOrigin, similar to
AddBreakOrigin.
* statement.cs (While.Resolve, Foreach.ArrayForeach.Resolve):
Create a new branching around the embedded statement.
(Do.Resolve, For.Resolve): Likewise. Do reachability analysis for
control flow after the embedded statement.
(Continue.Resolve): Move all error checking to AddContinueOrigin.
In tests:
* test-504.cs: New test from #76471.
In errors:
* cs0162-5.cs: New test from #76665.
svn path=/trunk/mcs/; revision=60218
* mcs/expression.cs (Invocation.VerifyArgumentsCompat): Don't try
implicit conversions on 'out' and 'ref' arguments.
* gmcs/expression.cs: Likewise.
* errors/cs1502-7.cs: New test from #75800.
svn path=/trunk/mcs/; revision=59696
Fix#66031
* statement.cs (Block.UsageWarning): Allow VariableInfo to be null.
(Catch.Resolve): Resolve VarBlock if it exists.
In errors:
* cs0168-2.cs: New test from #66031.
svn path=/trunk/mcs/; revision=59691
Support ParameterDefaultValueAttribute in gmcs. Also applied to
mcs to keep code differences small.
* attribute.cs (Attribute.GetParameterDefaultValue): New.
* typemanager.cs (parameter_default_value_attribute_type): New.
* parameter.cs (Parameter.ApplyAttributeBuilder): Use them. Add
CS1908 check.
In mcs:
Support ParameterDefaultValueAttribute in gmcs. Also applied to
mcs to keep code differences small.
* attribute.cs (Attribute.GetParameterDefaultValue): New.
* typemanager.cs (parameter_default_value_attribute_type): New.
* parameter.cs (Parameter.ApplyAttributeBuilder): Use them. Add
CS1908 check.
In errors:
* gcs1908.cs, gcs1908-2.cs, gcs1908-3.cs, gcs1908-4.cs: New tests
for DefaultParameterValueAttribute.
In tests:
* gtest-262.cs: New test for DefaultParameterValueAttribute.
svn path=/trunk/mcs/; revision=58300
* mcs/expression.cs (ParameterReference.DoResolveBase): Change return
type to bool.
(ParameterReference.DoResolve, ParameterReference.DoResolveLValue): Update.
* gmcs/expression.cs: Likewise.
* errors/cs1628-2.cs: New test from #77679.
svn path=/trunk/mcs/; revision=57466
* mcs/typemanager.cs (GetFullNameSignature): Don't nullref on
protected accessors.
* gmcs/typemanager.cs (GetFullNameSignature): Likewise.
* errors/cs0205-3.cs, errors/CS0205-3-lib.dll: New test based on #77642.
svn path=/trunk/mcs/; revision=57463
* mcs/cs-parser.jay (statement_expression): Don't list out the
individual statement-expressions. Convert syntax error into
CS0201 check.
* errors/cs0201-2.cs, errors/cs0201-3.cs: New tests from #76824.
svn path=/trunk/mcs/; revision=55676
Fix#76874.
* ecore.cs (MemberAccess.CheckIntermediateModification): Remove.
(UnboxCast.DoResolveLValue): New. Move CS0445 check from
CheckIntermediateModification.
(FieldExpr.DoResolve): Add new two-argument version that
allows us to resolve the InstanceExpression as an lvalue.
The one-argument variant is now just a wrapper.
(FieldExpr.DoResolveLValue): Use two-argument DoResolve.
Resolve the lhs as an lvalue if the it has a value type.
(FieldExpr.AssignToReadonly): Move CS1648 and CS1650 checks
from Assign.DoResolve.
(PropertyExpr.InstanceResolve): Allow InstanceExpression to be
resolved as an lvalue.
(PropertyExpr.DoResolve): Update.
(PropertyExpr.DoResolveLValue): Resolve the lhs as an lvalue if it
has a value type. Move CS1612 check here from
CheckIntermediateModification.
* assign.cs (Assign.DoResolve): Remove CS1648 and CS1650 checks.
* expression.cs (EmptyExpression.OutAccess): New. Used as the
'right_side' of a ResolveLValue on an 'out' argument.
(EmptyExpression.LValueMemberAccess): New. Used as the
'right_side' of a propagated ResolveLValue on a value type.
(LocalVariableReference.DoResolveBase): Recognize
EmptyExpression.OutAccess and EmptyExpression.LValueMemberAccess.
Add CS1654 check.
(Argument.Resolve): Use EmptyExpression.OutAccess rather than
EmptyExpression.Null.
In tests:
* test-488.cs: New test based on #76874.
In errors:
* cs1654.cs, cs1654-2, cs1656-4: New tests from #76874.
svn path=/trunk/mcs/; revision=55631
* mcs/expression.cs (MemberAccess.DoResolve): Disallow the use of '.'
on operands of 'void' type.
* errors/cs0023-3.cs: New test from #77204.
svn path=/trunk/mcs/; revision=55370
after the latest updates to this feature.
* gcs1726.cs: Likewise.
* gcs0281.cs: Likewise.
2005-12-21 Carlos Alberto Cortez <[email protected]>
svn path=/trunk/mcs/; revision=54703