Ticket #78: ticket78.patch
File ticket78.patch, 2.3 KB (added by hopscc, 16 years ago) |
---|
-
Source/Statements.cobra
912 912 .throwError('Expecting an event to raise.') 913 913 else if expr inherits IdentifierExpr # ex: raise _eventName 914 914 _name = expr.name 915 assert expr.potentialType916 915 _eventType = expr.potentialType 916 if not _eventType 917 hint = '' 918 if expr.type inherits MethodSig 919 hint = 'Did you mean to use "[_name](args)" to invoke the methodSig Identifier (delegate)?' 920 .throwError('The identifier target of "raise" is not an event. [hint]') 917 921 if _eventType.isDescendantOf(.compiler.delegateType) 918 922 pass 919 923 else if _eventType.isDescendantOf(.compiler.exceptionType) -
Tests/820-errors/300-statements/320-raise-not-event.cobra
1 class Test 2 3 sig SimpleMethod 4 5 def foo(s as SimpleMethod) 6 raise s # .error. invoke the methodSig Identifier 7 8 def foo2(s as SimpleMethod) 9 f=10 10 raise f # .error. target of "raise" is not an event 11 12 def foo3(s as SimpleMethod) 13 s() 14 15 def y 16 print 'Fired y' 17 18 def main is shared 19 x = Test() 20 x.foo( ref x.y) -
Developer/IntermediateReleaseNotes.text
178 178 179 179 * Added keyword `each`, reserved for future use. Added keywords for various modifiers that were already in use: `abstract`, `extern`, `fake`, `internal`, `new`, `nonvirtual`, `override`, `partial`, `public`, `private`, `protected`, `virtual`. Deprecated `fake` in favor of new `extern`. 180 180 181 * Fixed: Raise on a delegate should generate error message. ticket:78. 182 181 183 * Fixed: The Cobra command line compiler throws an exception for files with an all capital extension (FOO.COBRA). 182 184 183 185 * Fixed: Using "continue" in new style numeric for loops does not increment the loop variable. ticket:9