fork download
  1. type Vehicle() =
  2. abstract member TopSpeed: int -> int
  3. default this.TopSpeed x = if (x = 0) then 1 else (this.TopSpeed (x * 60 - 1))
  4. // default this.TopSpeed x =
  5. // while (x = 1) do (this.TopSpeed (x * 60 - 1))
  6. // 1
  7.  
  8. type Rocket() =
  9. inherit Vehicle()
  10. override this.TopSpeed x =
  11. printfn "rocket.TopSpeed = %i" <| x
  12. base.TopSpeed x * 10
  13.  
  14.  
  15. // test
  16. let vehicle = new Vehicle()
  17. printfn "vehicle.TopSpeed = %i" <| vehicle.TopSpeed 1
  18. let rocket = new Rocket()
  19. printfn "rocket.TopSpeed = %i" <| rocket.TopSpeed 2
Runtime error #stdin #stdout #stderr 0.09s 23256KB
stdin
Standard input is empty
stdout

Standard output is empty

stderr
Stacktrace:


Native stacktrace:

	/usr/bin/mono [0x80c976f]
	/usr/bin/mono [0x80f34db]
	[0xb775540c]
	[0xb775540c]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]
	[0xb7222584]

Debug info from gdb:


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

/spoj/fsharp_run: line 9: 16302 Aborted                 /usr/bin/mono prog.exe