Ticket #117 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

The operators ? and ?= should give a warning if the lhs is not nilable

Reported by: Chuck Owned by: Chuck
Priority: minor Milestone: Cobra 0.9
Component: Cobra Compiler Version: 0.8.0
Keywords: coalesce, warning Cc:


The expression a ? b will always evaluate to b if a is a non-nil type.


non-nilable-coalesce.patch Download (3.2 KB) - added by hopscc 12 years ago.

Change History

Changed 12 years ago by hopscc

Change to generate an error since thats what the '!' op does and the c# compiler emits an error for this case under some conditions (non-reference type?).

Changed 12 years ago by hopscc

Changed 12 years ago by hopscc

  • owner set to chuck
  • status changed from new to assigned

code patch, new test, fix now-failing test, relnote.

Changed 12 years ago by Chuck

  • owner changed from chuck to hopscc

I see new .throwError calls in the code, but no .error. directives in the tests. Is there a file missing or something?

Note to self: mac workspace-b

Changed 12 years ago by hopscc

  • owner changed from hopscc to Chuck

see new test file


second file entry in patch
lines 6,9,12,16,18.

Changed 12 years ago by Chuck

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

My bad. I forgot to svn add the file and didn't see it in my svn di

Patch applied in changeset:2220

Note: See TracTickets for help on using tickets.