-
Notifications
You must be signed in to change notification settings - Fork 854
Closed
Description
Using the following tools
Microsoft Visual Studio Community 2017 Preview
Version 15.8.0 Preview 2.0
VisualStudio.15.Preview/15.8.0-pre.2.0+27729.1
Microsoft .NET Framework
Version 4.7.02558
on Windows 10
Repro steps
- Create a library project
- Change the Target .NET Framework version to 4.5.2
- Change Target F# version to 4.1 (Core 4.4.3.0)
- Install SQLProvider package from NuGet
- Replace Library1.fs content with the following code
namespace Ns1
#nowarn "40"
open FSharp.Data.Sql
[<AutoOpen>]
module Definitions =
let [<Literal>] connString = @"Valid connection string"
let t1 = T1() //T1 not defined
type T1() =
static member f1() = connString
type amplaSQL = SqlDataProvider<ConnectionString = connString>
As expected 'let t1 = T1()' gives an error, being the type T1 defined later in the file. This is what rec namespace should allow
- Change the first line to 'namespace rec Ns1'
Expected behavior
No errors
Actual behavior
As expected, the previous error goes away as T1 is now known even in the affected line. However, a new unexpected error comes up in the last code line, complaining that connString is not defined
namespace rec Ns1
#nowarn "40"
open FSharp.Data.Sql
[<AutoOpen>]
module Definitions =
let [<Literal>] connString = @"Valid connection string"
let t1 = T1()
type T1() =
static member f1() = connString
type amplaSQL = SqlDataProvider<ConnectionString = connString> //connString not defined
Reactions are currently unavailable