Changeset 2360
- Timestamp:
- 05/01/10 11:10:17 (2 years ago)
- Location:
- cobra/trunk
- Files:
-
- 1 added
- 3 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/Expr.cobra (modified) (1 diff)
-
Source/Vars.cobra (modified) (1 diff)
-
Tests/200-misc/400-arguments/120-in-out-errors-mismatch.cobra (added)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r2359 r2360 458 458 459 459 * Fixed: Failure to infer types related to System.Text.RegularExpressions (MatchCollection and GroupCollections items). ticket:163 460 461 * Fixed: Missing `inout` produces a C# error message rather than a Cobra error message. ticket:199 -
cobra/trunk/Source/Expr.cobra
r2350 r2360 746 746 assert arg.didBindImp 747 747 assert param.didBindInt 748 # check any in/out/inout expectations are matched 749 if not param.matchLabel(arg.argumentLabel) 750 arg.recordError('Argument [i+1] of method "[_name]" expects a parameter labeled as ([param.kind]), but the call is supplying a label of ([arg.argumentLabel]).') 748 751 if arg.canBeAssignedTo(param.type) 749 752 arg.contextType = param.type -
cobra/trunk/Source/Vars.cobra
r2336 r2360 216 216 catch ne as NodeException 217 217 .compiler.recordError(ne) 218 219 218 219 def matchLabel(label as ArgumentLabel) as bool 220 """ Verify argumentLabel from method argument matches parameter kind """ 221 isValid = false 222 branch label 223 on ArgumentLabel.None 224 isValid = .kind == .KindEnum.Value 225 on ArgumentLabel.Out 226 isValid = .kind == .KindEnum.Out 227 on ArgumentLabel.InOut 228 isValid = .kind == .KindEnum.InOut 229 return isValid 230 220 231 class LocalVar inherits AbstractLocalVar is partial 221 232



