Ticket #319 (new enhancement)

Opened 6 years ago

Last modified 5 years ago

Move to .Net 4.0: Cobra dynamic codegen should use 'dynamic' type

Reported by: hopscc Owned by:
Priority: minor Milestone:
Component: Cobra Compiler Version: 0.9.3
Keywords: codegen Cc:


Cobra devolves untyped or 'dynamic' typed variables to Object on C# codegen due to lack of any other reasonable 'dynamic' equivalent.

This works fine so far as it goes but can lead to some oddities
(see ticket:249)
.Net 4.0 supports a 'dynamic' type itself so cobra should use that
when built/genned/running against/supporting .Net 4.0.

(This ticket pulled from ticket:249 and separately recorded as an eventual enhancement).

Change History

Changed 6 years ago by Charles

My plan right now is to cut a release "sometime soon" and then bump the minimum .NET version to 4.0. I was originally going to wait until Cobra 1.0, but .NET 4.0 is three years old now and I see no reason to keep supporting even older versions.

Changed 6 years ago by hopscc

  • summary changed from Cobra dynamic codegen should use 'dynamic' type for .Net 4.0 to Move to .Net 4.0: Cobra dynamic codegen should use 'dynamic' type

Changed 5 years ago by hopscc

See what happens with mapping cobra dynamic type on and off of .Net dynamic
(As well as dynamic type codegen need some changes in library loading to recognise and propagate .Net dynamic type into cobra)
see also ticket:361

Changed 5 years ago by nerdzero

Just an FYI, I took a stab at this a couple months ago and seem to remember running into some issues when constructors take dynamic parameters. Unfortunately, I don't recall the exact issue but it may have been related to this:

Note: See TracTickets for help on using tickets.