Changeset 1764
- Timestamp:
- 11/14/08 05:51:49 (8 weeks ago)
- Location:
- cobra/trunk/Source
- Files:
-
- 2 modified
-
BackEndClr/SharpGenerator.cobra (modified) (1 diff)
-
Expr.cobra (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/BackEndClr/SharpGenerator.cobra
r1763 r1764 4327 4327 if _left inherits ThisLit 4328 4328 if _right inherits CallExpr 4329 defi = _right.memberDefinition 4330 if defi inherits IMember 4331 writeThis = not defi.isShared 4332 else 4333 # TODO: compiler bug stimulated by following line: 4334 # throw FallThroughException({'right': _right, 'defi': defi}) 4335 throw FallThroughException(defi) 4329 writeThis = not _right.memberDefinition.isShared 4336 4330 else if _right inherits MemberExpr 4337 4331 writeThis = not _right.memberDefinition.isShared -
cobra/trunk/Source/Expr.cobra
r1763 r1764 370 370 DotExpr -- for _foo(args) --> ._foo(args) 371 371 PostCallExpr 372 373 A valid call expr may have a nil .definition because the receiver is dynamic. 372 374 """ 373 375 … … 377 379 var _args as List<of Expr> 378 380 var _hasParens as bool 379 var _definition as I NamedNode? # TODO: could tighten this down to IMember right?s381 var _definition as IMember? 380 382 381 383 def init(token as IToken, name as String, args as List<of Expr>, hasParens as bool) … … 445 447 446 448 _bindImpArgs 447 definition as I NamedNode?449 definition as IMember? 448 450 type as IType? 449 451 … … 456 458 return # TODO: I don't think I want a return here 457 459 458 definition = _inferDefinitionAndType(dotNode, definition,out type)460 definition = _inferDefinitionAndType(dotNode, out type) 459 461 assert type 460 462 if definition inherits IType # Box, IVar or GenericParam … … 529 531 transformTarget._transformTo(enumCall) 530 532 531 def _inferDefinitionAndType(dotNode as DotExpr, definition as INamedNode?, type as out IType?) as INamedNode?533 def _inferDefinitionAndType(dotNode as DotExpr, type as out IType?) as IMember? 532 534 type = nil 533 535 possibleDefinition = dotNode.left.memberForName(_name) … … 546 548 if not possibleDefinition.isCallable 547 549 .throwError('Cannot call "[_name]" because it is a "[possibleDefinition.englishName]".') 548 definition = possibleDefinition550 549 551 type = possibleDefinition.resultType 550 return definition552 return possibleDefinition 551 553 552 554 def _transformToPostCallExprOnType(dotNode, definition as IType?)
