Forum: IronRuby Complex Inheritance Issue

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Andrew P. (Guest)
on 2008-11-03 05:56
(Received via mailing list)
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.
Curt H. (Guest)
on 2008-11-03 06:02
(Received via mailing list)
"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?
Andrew P. (Guest)
on 2008-11-03 07:13
(Received via mailing list)
My bad, thanks :-)
This topic is locked and can not be replied to.