http://bugzilla.novell.com/show_bug.cgi?id=624304
http://bugzilla.novell.com/show_bug.cgi?id=624304#c0 Summary: TypeLoadException in F# interactive with user-defined types Classification: Mono Product: Mono: Runtime Version: 2.6.x Platform: x86-64 OS/Version: Ubuntu Status: NEW Severity: Normal Priority: P5 - None Component: misc AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 I often get TypeLoadException when using F# interactive on Mono. Below bug.fsx raises the exception, while bug2.fsx works (it does nothing as expected). ubuntu% mono -V Mono JIT compiler version 2.6.4 (tarball Thu Jul 1 18:26:09 BST 2010) Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC and Parallel Mark) SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none ubuntu% uname -a Linux ubuntu 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux ubuntu% cat bug.fsx type K = K of int //let a = K(0) let b = [ for i in 0 .. 0 -> K(0) ] ubuntu% mono /usr/lib/fsharp/fsi.exe bug.fsx System.TypeLoadException: A type load exception has occurred. at [email protected] (IEnumerable`1& next) [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].MoveNextImpl () [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1[T].System-Collections-IEnumerator-MoveNext () [0x00000] in <filename unknown>:0 at Microsoft.FSharp.Collections.SeqModule.ToList[K] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 at <StartupCode$FSI_0001>.$FSI_0001.main@ () [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Stopped due to error ubuntu% cat bug2.fsx type K = K of int let a = K(0) let b = [ for i in 0 .. 0 -> K(0) ] ubuntu% mono /usr/lib/fsharp/fsi.exe bug2.fsx ubuntu% Reproducible: Always It seems to be related to user-defined types, when used with IEnumerable. This might be connected to Bug #624299. Also, note this bug can be reproduced only with F# interactive (fsi.exe), not with F# compiler (fsc.exe). I have tested with the latest F# release from www.fsharp.net website. Microsoft (R) F# 2.0 Compiler build 2.0.0.0 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
