Ticket #285 (new defect)

Opened 1 year ago

Last modified 1 year ago

void function allows return value

Reported by: lth Assigned to: anonymous
Type: defect Priority: major
Milestone: Component: RefImpl
Version: 4 Keywords:
Cc: jeffdyer, graydon, brendan, dherman, cormac, chrispi, hallvord

Description

Syntax error or compile time error?

function f(): void { return 10 }
f()
=> 10

My vote is compile-time error since the program is syntactically malformed.

Attachments

Change History

Changed 1 year ago by hallvord

  • cc changed from jeffdyer,graydon,brendan,dherman,cormac,chrispi to jeffdyer, graydon, brendan, dherman, cormac, chrispi, hallvord
Note: See TracTickets for help on using tickets.