Ticket #170: multiarg-inferType-cast.patch
File multiarg-inferType-cast.patch, 1.9 KB (added by hopscc, 15 years ago) |
---|
-
Source/Statements.cobra
1515 1515 else 1516 1516 return false 1517 1517 if all for e in _rvals get e inherits Literal or e inherits DotExpr or e inherits MemberExpr or _ 1518 (e inherits IdentifierExpr and (e to IdentifierExpr).name not in tnames) 1518 e inherits AbstractToExpr or _ 1519 (e inherits IdentifierExpr and (e to IdentifierExpr).name not in tnames) 1519 1520 return true 1520 1521 return false 1521 1522 -
Tests/320-misc-two/810-multi-assignment/300-multiAssign-comma-sep.cobra
13 13 ma.literals 14 14 ma.variables 15 15 ma.exprs 16 ma.cast 16 17 ma.asExpected 17 18 ma.swap 18 19 … … 89 90 def geti(i as int) as int 90 91 return i+2 91 92 93 def cast # post tkt170 fix 94 x = 'aoeu' to Object 95 y = 5 to Object 96 a, b = x to String, y to int 97 assert a.length == 4 98 assert b * 2 == 10 99 100 c, d = x to? String, y to? int 101 assert c.length == 4 102 assert d * 2 == 10 103 92 104 def asExpected 93 105 # test expression values are pinned outside assignment stream 94 106 a,b = c=2,3 -
Developer/IntermediateReleaseNotes.text
44 44 45 45 * Support covariance from arrays to arrays and streams. ticket:162 46 46 47 * Fix for Multitarget assignment not inferring types of cast expressions. ticket:170 47 48 48 49 ================================================================================ 49 50 Library