Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:44:08+00:00 2026-05-26T11:44:08+00:00

Here is what am I trying to do : and [<AbstractClass>] Figure() = let

  • 0

Here is what am I trying to do :

and [<AbstractClass>] Figure() =
    let mutable name : string = ""
    let mutable color : ColorType = WHITE   
    abstract member Name : string       
    member F.Color
        with get()  = color
        and set v   = color <- v
    abstract member motion : Dashboard -> SPosition -> ColorType -> list<SPosition * CellDashboard * bool>;
    override F.ToString() = name
and CellDashboard(addingFigure : Nullable<Figure>) as C =
    let mutable attacked    : bool      = false;
    let mutable cleaned     : bool      = false;
    let mutable _CellState  : Nullable<Figure> = Nullable<Figure>(addingFigure);

the trouble is :

Error   1   A generic construct requires that the type 'Figure' be non-abstract

why ? And how can I avoid this error ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:44:09+00:00Added an answer on May 26, 2026 at 11:44 am

    The Nullable<T> type can only be used for .NET value types. The error message essentially means that the compiler cannot check whether the constraint holds or not (because the type is abstract).

    If you want to represent missing value in F#, it is better to use option<T> instead.

    If you’re writing code that will be used from C#, then it is better to avoid exposing F#-specific types (like option<T>) and you can mark the type with AllowNullLiteral, which makes it possible to pass null as a value of the type (but null is evil, so this shouldn’t be done unless necessary!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set parameters for a abstract class: public abstract class NewMath {
I'm trying out the gwt-comet extension here . I cant get any messages from
I am trying to get C2DM to work, I'm following the ChrometoPhone example here
I'm trying to maintain a dictionary of configurations. Here is my abstract class. [Serializable]
Programming Student here...trying to work on a project but I'm stuck. The project is
I am going nuts here trying to resolve a cascading update/delete issue :-) I
I know of the ||= operator, but don't think it'll help me here...trying to
Noob dumb question, no doubt -- but here it is: Trying to tutorialize myself
After my last, failed, attempt at asking a question here I'm trying a more
Here's what I am trying to do: typedef enum { ONE, TWO, THREE }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.