Incorrect implementation of F # CodeDom

I am trying to create a class and method in it. For C # and VB, CodeDom providers emit the expected output, but the F # CodeDom provider emits the following. I wonder why.

exception ReturnException8abef2fbb2404165b4b8690157bd3a49 of obj
exception ReturnNoneException8abef2fbb2404165b4b8690157bd3a49

type
    // Hello

    test = class
        new() as this =
            {
            }
        abstract my_method : unit -> unit
        default this.my_method  () =
            ()
    end

Ignoring the exception element (I think the provider is still a bit buggy), I am curious why I get such a strange definition using an new() as thisabstract method and default implementation. Did I miss something?

+3
source share
2 answers

, CodeDOM, , F #, . kvb, . , CodeDOM , , .

, return ( #). , F #:

for(int i = 0; i < 10; i++)
  if (i == 5) return;

CodeDOM return try .. with .

F # #/VB, CodeDOM #/VB. F #, . , - F # CodeDOM, , .

+4

.

new() as this = {}

- , - , F # (. 8.14.2 ).

+3

Source: https://habr.com/ru/post/1783082/


All Articles