Last active
January 25, 2022 04:04
-
-
Save kant2002/0c8bbeeeb4b693df2e9d64096e040395 to your computer and use it in GitHub Desktop.
F# test app for reflection-free code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# one time | |
./build.sh | |
# when make changes to compiler | |
dotnet build src/fsharp/fsc/fsc.fsproj | |
# Compile test application | |
artifacts/bin/fsc/Debug/net5.0/fsc ../test.fs --targetprofile:netcore --target:exe --out:test.exe | |
dotnet test.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Runtime.CompilerServices | |
//type ReflectionFreeCodeAttribute() = inherit System.Attribute() | |
namespace Test | |
open Microsoft.FSharp.Core | |
type NestedName = NestedName of string | |
module Test = | |
[<assembly:ReflectionFreeCode>] | |
do | |
() | |
[<EntryPoint>] | |
let main argv = | |
let bb = NestedName "S_S" | |
printfn "%O" bb | |
0 // return an integer exit code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment