Skip to content

Nullable Interop Feature causes a breaking change in byref types. #9565

@KevinRansom

Description

@KevinRansom

repro:

  1. do a release build of master branch
  2. pushd C:\kevinransom\fsharp\tests\fsharp\core\byrefs
  3. C:\kevinransom\fsharp\tests\FSharp.Test.Utilities....\artifacts\bin\fsc\Release\net472\fsc.exe -r:System.Core.dll --nowarn:20 --define:COMPILED -o:test.exe -g test.fsx --langversion:5.0

Observe the error messages:

test.fsx(222,19): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(222,19): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(222,19): error FS0421: The address of the variable 'res' cannot be used at this point

test.fsx(240,28): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(240,28): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(240,28): error FS0421: The address of the variable 'res' cannot be used at this point

test.fsx(311,10): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(311,10): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(311,10): error FS0421: The address of the variable 'res' cannot be used at this point

test.fsx(890,31): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(890,31): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(890,31): error FS0421: The address of the variable 'r1' cannot be used at this point

test.fsx(1428,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1428,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1428,44): error FS0418: The byref typed value 'x' cannot be used at this point

test.fsx(1448,43): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1448,43): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1448,43): error FS0418: The byref typed value 'x' cannot be used at this point

test.fsx(1458,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1458,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1458,44): error FS0418: The byref typed value 'x' cannot be used at this point

test.fsx(1464,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1464,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1464,44): error FS0418: The byref typed value 'x' cannot be used at this point

test.fsx(1484,43): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1484,43): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1484,43): error FS0418: The byref typed value 'x' cannot be used at this point

test.fsx(1494,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1494,44): error FS0412: A type instantiation involves a byref type. This is not permitted by the rules of Common IL.

test.fsx(1494,44): error FS0418: The byref typed value 'x' cannot be used at this point

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions