Ticket #308 (assigned defect)

Opened 6 years ago

Last modified 6 years ago

cobra internal error: unknown member exception

Reported by: kobi7 Owned by: Charles
Priority: major Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:



The Cobra Programming Language svn:2844 (post 0.9) / 2012-11-14
on .NET CLR v4.0.30319 on Microsoft Windows NT 5.1.2600 Service Pack 3
at C:\Cobra\Cobra-svn-2844\bin\cobra.exe

the compilation error:

Error: error: COBRA INTERNAL ERROR / UnknownMemberException / obj=MethodSig-sh(6749, name=LimitReachedHandler, didStartBindInh=true, didBindInh=true, didStartBindInt=true, didBindInt=true, didStartBindImp=true, didBindImp=true, token=Token(SIG, 'sig', 'sig', ln 36, col 2, H:\projects\generic_project\ManageProfiling.cobra), didBindInh=true, isGeneric=false, isGenericDef=false, needsConstruction=false, genericDef=nil, baseClass=Class-mi(1031, name=MulticastDelegate, didStartBindInh=true, didBindInh=true, didStartBindInt=true, didBindInt=true, didBindImp=false, token=Token.empty, didBindInh=true, isGeneric=false, isGenericDef=false, needsConstruction=false, 1031), nativeType=nil, baseNode=LibraryTypeProxy-mi(6748, didBindInh=false, didBindInt=false, didBindImp=false), 6749), name='IsPublic', type=MethodSig

okay, the code that triggered it is perhaps kinda tricky.
I have a mixin with a shared (static) event.
(basically notifying when would be a good time to do a potentially heavy operation)
and the adding part, registers a listen with a method, in the 'cue init' part, if the right option flag is set.
the problem may come from the event signature, which is empty.

here's some code:

mixin ManageProfiling
	sig LimitReachedHandler
	event reachedLimit as LimitReachedHandler is shared

class Controller
	adds ManageProfiling

    cue init(view as IView, options as Options)
		_opts = options
		if Options.Profile in _opts
			listen ManageProfiling.reachedLimit, ref .doSaveState

	def doSaveState

Thanks for all the work!

Change History

Changed 6 years ago by kobi7

after rev. 2848
this code is almost fixed.

I only get something weird with regard to an event inside a mixin.

Error: "GenericProject?.Controller" does not implement interface member "GenericProject?.ManageProfiling?.ReachedLimit?" (generic_project)

ofcourse it's a mixin, and not an interface, and the member is "there by definition". as per the idea of a mixin.

or maybe I got something mixed up?

Changed 6 years ago by Charles

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

I was working on ticket:308 when I realized there was another problem that needed fixing, which is what changeset:2848 is all about.

I'm aware that 308 is still open and needs help.

Also, in the future, if the code you include with the ticket can be self-contained with no external references to other types, libs, etc. that is always the ideal.

Changed 6 years ago by Charles

Btw it would be nice if ticket summaries started with the language feature in question when appropriate. In this case:

mixins: cobra internal error: unknown member exception

Note: See TracTickets for help on using tickets.