Wiki

Ticket #77 (closed defect: fixed)

Opened 16 years ago

Last modified 12 years ago

Eliminate false 'inherits' warning on 'passthrough' type

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

Description

Get rid of this warning:

... a inherits B ...
warning: The expression (of type "passthrough") is never of type "Foo".

It comes up as part of error recovery, but you can simulate it:

class A

	def main is shared
		x as int = 1 to passthrough
		if x inherits A
			print 'A'

Attachments

passthrough-no-warn.patch Download (1.3 KB) - added by hopscc 12 years ago.

Change History

Changed 12 years ago by hopscc

Simulation doesnt gen same warning.
Did you mean

class A

	def main is shared
		x as passthrough = 1 
		if x inherits A
			print 'A'

Changed 12 years ago by hopscc

Changed 12 years ago by hopscc

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

suppress warning if type is PassThrough?.

Changed 12 years ago by Charles

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

Patch applied in changeset:2952. Thanks.

Check-in comment:

Fixed: In compile-time error recovery situations, there are extraneous warnings regarding the inherits operator and the passthrough type.

Note: See TracTickets for help on using tickets.