Wiki

Ticket #171 (new defect)

Opened 15 years ago

Dynamic does not work well with arithmetic

Reported by: Chuck Owned by:
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Dynamic works well with method calls. For example, given a local d of type dynamic, you can say .foo(d) even if .foo is expecting a static type. And you can say x = d.bar(args) where .bar is late bound.

However, x + d and d + x yield compilation errors. They should work and be late bound. Same with all other operators.

(Unfortunately, .NET does not make this easy as operators are static methods sitting around in various classes.)

Note: See TracTickets for help on using tickets.