Wiki

Ticket #196 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

Cobra compile failure on delegates calling .{begin,end}Invoke

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

Description

see discussion topic  Parallel For

If you declare and instantiate a delegate then attempt to use it
with beginInvoke and endInvoke the cobra compiler emits an error message for these methods not being available.

The MS doc refers to these methods as being added by the CLR rather
than statically presented on a delegate class  Delegates in the Common Type System so its likely the std cobra method lookup
needs some augmentation for allowing access to these weirdo-provided methods.

Attachments

begin-end-invoke.patch Download (4.5 KB) - added by hopscc 15 years ago.

Change History

Changed 15 years ago by hopscc

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

Changed 15 years ago by hopscc

Changed 15 years ago by hopscc

  • owner changed from hopscc to Chuck

Patch, Test, Relnote

Changed 15 years ago by Chuck

  • owner changed from Chuck to hopscc

I get an exception for the test case, at least on Mono:

Unhandled Exception: Cobra.Lang.AssertException: 
sourceSite = /Users/chuck/Projects/Cobra/workspace-f/Tests/220-delegates-etc/100-delegates/160-asyncThd.cobra:45
in AsyncMain.main for object AsyncMain (MonoType)
info       = nil
this       = AsyncMain (MonoType)
    (threadId == 3) = false
        threadId = 1

  at AsyncMain.Main () [0x00177] in /Users/chuck/Projects/Cobra/workspace-f/Tests/220-delegates-etc/100-delegates/160-asyncThd.cobra:49
Exit code = 1

What do you think?

Changed 15 years ago by hopscc

  • owner changed from hopscc to Chuck

That asssert on line 45 of the test is probably bogus for cross platform though it works fine for every run I've done on windows/.Net,

Drop it entirely (comment it out) or change to

assert threadId <> Thread.currentThread.managedThreadId

Changed 15 years ago by Chuck

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

Fixed in changeset:2299

Thanks.

Note: See TracTickets for help on using tickets.