I've solved it pointing explicit type to the compiler:

1
2
member v.SendNotif(subPort:SubscriptionManagerPort,msg:ProcessImage) = 
        base.SendNotification(subPort,(msg:>DsspOperation))

In 1.9.6.2 I have it implicitly. So, in 1.9.6.16 I should do it explicitly? Is there any implicit way?

By on 5/29/2009 3:33 AM ()

Any chance you can turn this into a smaller standalone repro? I'm unsure which overloads were contenders and which finally 'won' with your fix, nor what the ProcessImage hierarchy is. Seems like maybe you can author a class of your own with a couple overloads that demonstrates the same problem, which would then be easier to diagnose.

By on 5/29/2009 7:01 AM ()

I think this type inference used to work in September CTP, but not in May CTP:

1
2
3
4
5
6
7
8
let getBytes a b =

  let s = a + " and " + b

  System.Text.Encoding.ASCII.GetBytes s

getBytes "Jack" "Jill"
By on 6/10/2009 10:49 AM ()

Here is another example where type inference used to work in September CTP, but not in May CTP:

1
2
3
4
5
6
 

let endpoint protocolAndHost path =

  new System.ServiceModel.EndpointAddress(protocolAndHost + path)
By on 6/10/2009 11:02 AM ()

I'd tried to create smaller sample (can provide it), but didn't success with it. Everything works fine with my implementation. My misunderstanding of overloading is somewhere in that hierarchy. I would like to solve problem with this hierarchy.

By the way my last post solution solved compilation error, and runtime error appeared. Some error concerned with types reflection. My solution works with following:

1
2
3
     member v.SendNotif(subPort:SubscriptionManagerPort,msg:ProcessImage) = 
        v.SendNotification(subPort,msg,String.Empty) 

I can provide you with whole hierarchy you'll request. ProcessImage defined as:

1
2
3
4
5
6
 

type ProcessImage = 
    inherit Update<ImageResult, PortSet<DefaultUpdateResponseType, Fault>>
    new() = {inherit Update<ImageResult, PortSet<DefaultUpdateResponseType, Fault>>()}
    new(body) = {inherit Update<ImageResult, PortSet<DefaultUpdateResponseType, Fault>>(body)}

where:

1
2
3
4
5
6
7
public class Update : DsspOperation where TBody: new() where TResponse: IPort, new()
{
    // Methods
    public Update();
    public Update(TBody body);
    public Update(TBody body, TResponse responsePort);
} 
1
2
3
4
5
6
7
8
9
10
11
12
13
public class DsspOperation : DsspOperation where TBody: new() where TResponse: IPort, new()
{
    // Fields
    private TResponse _responsePort;
    // Methods
    public DsspOperation();
    public DsspOperation(string action);
    public DsspOperation(string action, TBody body);
    public DsspOperation(string action, TBody body, TResponse responsePort);
    // Properties
    public TBody Body { get; set; }
    public TResponse ResponsePort { get; set; }
}

Anything else?

By on 5/30/2009 3:49 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper