Ticket #317 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

float32?[] not compilable as a parameter type

Reported by: DelphiGuy Owned by: Chuck
Priority: major Milestone:
Component: Cobra Compiler Version: 0.9.3
Keywords: Cc:


as you'll see above, nerdzero gives an example and cites the compiler's error message.

i'm running:

MD 3.0.6, Cobra 0.9.3 on .NET CLR v4.0.30319 on Microsoft Windows NT 6.1.7601 Service Pack 1

i'll leave it to you to set the priority field on this ticket.

thanks, charles.


tkt-317-nilableArrayItems.patch Download (1.3 KB) - added by hopscc 6 years ago.

Change History

Changed 6 years ago by hopscc

heres a little test program

class NilArr
    def main is shared
        tNF as float32?[] = @[10.2f32, nil]
        tNF = float32?[](10)    # expression    
        tNF[0]= 32.1f32
        print tNF
    def x(a as float32?[] ) is shared   
        print 'In x', a

Its basically a parse failure for arrayType of nilable Items (only)

It parses incorrectly and silently on the local var type ( typed to float32? )
( dunno what happens to the trailing [] - some sort of empty expression??)
but fails parse on the method param.
Testing a patch now...

Changed 6 years ago by hopscc

Changed 6 years ago by hopscc

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

Changed 6 years ago by Charles

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

Patch applied in changeset:2945

Note: See TracTickets for help on using tickets.