提交 a233c0a7 编写于 作者: Y Yury Yaroshevich 提交者: latkin

Added tests to reveal problem with source code location for FS0988 warning

closes https://github.com/Microsoft/visualfsharp/pull/465
ref https://github.com/Microsoft/visualfsharp/issues/461

commit c129badb23e20de07bdb38ea16fa2fa32a31cdb1
Author: Yury Yaroshevich <mstyura@hotmail.com>
Date:   Thu May 21 22:34:51 2015 +0300

    https://github.com/Microsoft/visualfsharp/issues/461: Added tests to reveal problem with source code location for FS0988 warning
上级 88e246b3
// #Regression #NoMT #EntryPoint
// Empty program entry point warning
// Lack of entry point produces warning with correct source location when compiled to *.exe
// when multiple namespaces with multiple modules declared in source file
//<Expects id="FS0988" span="(22,24-22,24)" status="warning">Main module of program is empty\: nothing will happen when it is run</Expects>
#light
namespace MyNamespace1
module MyModule1 =
let irrelevant = 10
module MyModule2 =
let irrelevant = 10
namespace MyNamespace2
module MyModule3 =
let irrelevant = 10
module MyModule4 =
let irrelevant = 10
\ No newline at end of file
// #Regression #NoMT #EntryPoint
// Empty program entry point warning
// Lack of entry point produces warning with correct source location when compiled to *.exe
// when single module declared inside namespace
//<Expects id="FS0988" span="(11,24-11,24)" status="warning">Main module of program is empty\: nothing will happen when it is run</Expects>
#light
namespace MyNamespace1
module MyModule1 =
let irrelevant = 10
\ No newline at end of file
// #Regression #NoMT #EntryPoint
// Empty program entry point warning
// Lack of entry point produces warning with correct source location when compiled to *.exe
// when multiple modules declared without declaring namespace
//<Expects id="FS0988" span="(13,24-13,24)" status="warning">Main module of program is empty\: nothing will happen when it is run</Expects>
#light
module MyModule1 =
let irrelevant = 10
module MyModule2 =
let irrelevant = 10
\ No newline at end of file
// #Regression #NoMT #EntryPoint
// Empty program entry point warning
// Lack of entry point produces warning with correct source location when compiled to *.exe
// when source file declares type inside namespace
//<Expects id="FS0988" span="(10,18-10,18)" status="warning">Main module of program is empty\: nothing will happen when it is run</Expects>
#light
namespace MyNamespace1
type T = T of int
\ No newline at end of file
......@@ -16,4 +16,8 @@ NoMT SOURCE=entrypointandFSI02.fsx FSIMODE=EXEC COMPILE_ONLY=1 # entrypointan
SOURCE=E_CompilingToALibrary01.fs SCFLAGS="--test:ErrorRanges --target:library" # E_CompilingToALibrary01.fs
SOURCE=E_CompilingToAModule01.fs SCFLAGS="--test:ErrorRanges --target:module" # E_CompilingToAModule01.fs
SOURCE=EntryPointAndAssemblyCulture.fs # EntryPointAndAssemblyCulture.fs
\ No newline at end of file
SOURCE=EntryPointAndAssemblyCulture.fs # EntryPointAndAssemblyCulture.fs
SOURCE=W_NoEntryPointInLastModuleInsideMultipleNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointInLastModuleInsideMultipleNamespace.fs
SOURCE=W_NoEntryPointModuleInNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointModuleInNamespace.fs
SOURCE=W_NoEntryPointMultipleModules.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointMultipleModules.fs
SOURCE=W_NoEntryPointTypeInNamespace.fs SCFLAGS="--test:ErrorRanges" # W_NoEntryPointTypeInNamespace.fs
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册