@@ -4502,17 +4502,24 @@ module Project37 =
45024502
45034503 let fileName1 = Path.ChangeExtension( Path.GetTempFileName(), " .fs" )
45044504 let base2 = Path.GetTempFileName()
4505+ let fileName2 = Path.ChangeExtension( base2, " .fs" )
45054506 let dllName = Path.ChangeExtension( base2, " .dll" )
45064507 let projFileName = Path.ChangeExtension( base2, " .fsproj" )
45074508 let fileSource1 = """
4508- [<System.AttributeUsage(System.AttributeTargets.Method ||| System.AttributeTargets.Assembly)>]
4509+ namespace AttrTests
4510+
4511+ [<System.AttributeUsage(System.AttributeTargets.Method ||| System.AttributeTargets.Assembly) >]
45094512type AttrTestAttribute() =
45104513 inherit System.Attribute()
45114514
45124515 new (t: System.Type) = AttrTestAttribute()
45134516 new (t: System.Type[]) = AttrTestAttribute()
45144517 new (t: int[]) = AttrTestAttribute()
45154518
4519+ [<System.AttributeUsage(System.AttributeTargets.Assembly) >]
4520+ type AttrTest2Attribute() =
4521+ inherit System.Attribute()
4522+
45164523type TestUnion = | A of string
45174524type TestRecord = { B : int }
45184525
@@ -4534,7 +4541,14 @@ module Test =
45344541do ()
45354542"""
45364543 File.WriteAllText( fileName1, fileSource1)
4537- let fileNames = [ fileName1]
4544+ let fileSource2 = """
4545+ namespace AttrTests
4546+
4547+ [<assembly: AttrTest2()>]
4548+ do ()
4549+ """
4550+ File.WriteAllText( fileName2, fileSource2)
4551+ let fileNames = [ fileName1; fileName2]
45384552 let args = mkProjectCommandLineArgs ( dllName, fileNames)
45394553 let options = checker.GetProjectOptionsFromCommandLineArgs ( projFileName, args)
45404554 let wholeProjectResults =
@@ -4581,4 +4595,4 @@ let ``Test project37 typeof and arrays in attribute constructor arguments`` () =
45814595 | _ -> ()
45824596 Project37.wholeProjectResults.AssemblySignature.Attributes
45834597 |> Seq.map ( fun a -> a.AttributeType.CompiledName)
4584- |> Array.ofSeq |> shouldEqual [| " AttrTestAttribute" |]
4598+ |> Array.ofSeq |> shouldEqual [| " AttrTestAttribute" ; " AttrTest2Attribute " |]
0 commit comments