[Ironruby-core] Complex Inheritance Issue

Curt Hagenlocher curth at microsoft.com
Sun Nov 2 23:01:46 EST 2008


"Superclass mismatch" means that the class was reopened using a different base class.  At the point this code is reached, what's the value of Templates_IronRuby_CustomBaseClass_haml.superclass?

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Andrew Peters
Sent: Sunday, November 02, 2008 7:55 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] Complex Inheritance Issue

I have this test case which throws an error:

class Templates_IronRuby_CustomBaseClass_haml<NHaml::Tests::CustomTemplate4[System::Collections::Generic::List[System::Collections::Generic::List[System::Int32]]]

System.InvalidOperationException : superclass mismatch for class
Templates_IronRuby_CustomBaseClass_haml
        C:\Dev\ironruby\trunk\src\ironruby\Runtime\RubyUtils.cs(416,0): at
IronRuby.Runtime.RubyUtils.DefineClass(Scope autoloadScope, RubyModule
owner, String name, Object superClassObject)
        C:\Dev\ironruby\trunk\src\ironruby\Runtime\RubyOps.cs(533,0): at
IronRuby.Runtime.RubyOps.DefineNestedClass(RubyScope scope, String
name, Object superClassObject)
        at #top-level-method#$25##25(Closure , Scope , LanguageContext )
        C:\Dev\ironruby\trunk\src\Microsoft.Scripting\Runtime\ScriptCode.cs(89,0):
at Microsoft.Scripting.ScriptCode.InvokeTarget(LambdaExpression code,
Scope scope)
        C:\Dev\ironruby\trunk\src\Microsoft.Scripting\SourceUnit.cs(227,0):
at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink
errorSink)
        C:\Dev\ironruby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource.cs(127,0):
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
        C:\Dev\ironruby\trunk\src\Microsoft.Scripting\Hosting\ScriptEngine.cs(110,0):
at Microsoft.Scripting.Hosting.ScriptEngine.Execute(String expression)

Bug?

Cheers,

Andrew.
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list