Wiki

Ticket #136 (closed defect: fixed)

Opened 16 years ago

Last modified 16 years ago

nullable issue when linking cobra lib

Reported by: gauthier Owned by: Chuck
Priority: major Milestone: Cobra 0.9
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

while this run fine in single assembly:

class Foo
	pro bar from var as DateTime?
class Program
	shared
		def main
			date = DateTime.utcNow
			foo = Foo(bar = date)
			print foo.bar

this give

nullable.cobra(1): error: Incompatible types. Cannot assign value of type DateTime on the right to Nullable<of DateTime> on the left.
Compilation failed - 1 error, 0 warnings
Not running due to errors above.

when splitted, and

nullable.cobra(1): error: Incompatible types. Cannot assign value of type DateTime? on the right to Nullable<of DateTime> on the left.
Compilation failed - 1 error, 0 warnings
Not running due to errors above.

when issuing "to ?" from main

Change History

Changed 16 years ago by Chuck

  • owner set to Chuck
  • status changed from new to accepted

The culprit is that Cobra is not recognizing .NET's Nullable<of X> as X?. I'm surprised this wasn't reported earlier! Fixing now.

Changed 16 years ago by Chuck

  • status changed from accepted to closed
  • resolution set to fixed

Fixed in changeset:1908

Note: See TracTickets for help on using tickets.