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

  • Home
  • SEARCH
  • 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 8117983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:20:24+00:00 2026-06-06T04:20:24+00:00

I have the following simple type: module Structures type Point2D<‘T> (x : ‘T, y

  • 0

I have the following simple type:

module Structures
    type Point2D<'T> (x : 'T, y : 'T) =
        member this.X = x
        member this.Y = y
        member this.IsEqualTo (p : Point2D<'T>) =
            (this.X = p.X) && (this.Y = p.Y)

But Visual Studio (2012 Trial Version) places a red squiggly line under the name “IsEqualTo,” and a blue squiggly line under “this.X.”

The error message for the red squiggly line is as follows:

The generic member IsEqualTo has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the members explicitly, including argument types, return types and any additional generic parameters and constraints.

The message for the blue line is:

A type parameter is missing a constraint ‘when ‘T : equality’

I’ve tried placing “IsEqualTo” before all the other members, but the error persists.

I’m guessing the error has something to do with the fact that the = sign in this.X = p.X is working over the generic type 'T but I can’t seem to correct it.

Thank you in advance for your help.

  • 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-06-06T04:20:26+00:00Added an answer on June 6, 2026 at 4:20 am
    type Point2D<'T when 'T : equality> (x : 'T, y : 'T) =
        member this.X = x
        member this.Y = y
        member this.IsEqualTo (p : Point2D<'T>) =
            (this.X = p.X) && (this.Y = p.Y)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have the following simple code, but it doesn,t work <ul> <li id=one onmouseover=this.style.background-color='white';>
I have the following simple function: private void EnableDisable941ScheduleBButton() { if (this._uosDepositorFrequency.Value != null)
I have the following simple line in d3 but haven't an issue trying to
I have a simple custom exception defined like like the following but I don't
Okay, this should be really simple, but I have searched all over for the
I have a package with the following structure (okay, this is greatly simplified, but...)
I have following simple class: @interface Article: NSObject { NSString *title; } @property (copy,
I have following simple program: import std.stdio; int main(string[] argv) { writeln(Hello, world!); return
I'm using MVC 4, EF 4.3 and the MVCScaffolding package. I have following simple
I have following rather simple query select count(*) from tbl t1, tbl t2 For

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.