Skip to content

Instantly share code, notes, and snippets.

@palladin
Created March 7, 2014 15:02
Show Gist options
  • Save palladin/9413058 to your computer and use it in GitHub Desktop.
Save palladin/9413058 to your computer and use it in GitHub Desktop.
Line 7 - Error 1 'base' values may only be used to make direct calls to the base implementations of overridden members Script1.fsx 9 30 Miscellaneous Files
type MyClassBase1<'T> () =
abstract member function1 : unit -> unit
default u.function1 () = ()
and MyClassDerived1 () =
inherit MyClassBase1<int>()
override u.function1 () = base.function1()
@chr1st0scli
Copy link

Not sure what this is all about, but are you trying the equivalent of:
abstract class MyClassBase1
{
protected abstract void function1();
}

class MyClassDerived1 : MyClassBase1
{
protected override void function1()
{
base.function1(); //cannot call an abstract base member
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment