Changeset 1577
- Timestamp:
- 08/14/08 06:57:27 (3 months ago)
- Location:
- cobra/trunk
- Files:
-
- 4 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/BinaryOpExpr.cobra (modified) (1 diff)
-
Source/Expr.cobra (modified) (1 diff)
-
Tests/220-delegates-etc/100-delegates/130-ref-error.cobra (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r1576 r1577 99 99 100 100 * Fixed: Cannot use the `branch` statement if the expression has a dynamic type. 101 102 * Fixed: Using `ref` on a variable that experienced an error causes an internal exception. -
cobra/trunk/Source/BinaryOpExpr.cobra
r1562 r1577 1114 1114 on 'NOTIN', sw.write('!') 1115 1115 on 'IN', pass 1116 else :throw FallThroughException(_op)1116 else, throw FallThroughException(_op) 1117 1117 if _containsExpr 1118 1118 _containsExpr.writeSharpDef(sw, parens) -
cobra/trunk/Source/Expr.cobra
r1564 r1577 1922 1922 if right.definition inherits AbstractMethod or right.definition inherits MemberOverload 1923 1923 right.isReference = true 1924 else if right.definition is nil 1925 # happens from error recovery such as: obj = BadClassName() ... ref obj.foo 1926 pass 1924 1927 else 1925 1928 .throwError('Only methods can be referenced, not [right.definition.englishName].') -
cobra/trunk/Tests/220-delegates-etc/100-delegates/130-ref-error.cobra
r1442 r1577 7 7 def init(command as BindMethod) 8 8 _command = ref command # .error. Only methods can be referenced, not parameters. 9 10 x = X() 11 _command = ref x.foo # .error. Cannot find a definition for "foo" 12 13 bad = BadClassName() # .error. Cannot find "BadClassName". 14 _command = ref bad.method # use to throw exception in compiler
