Skip to content

Commit 3190096

Browse files
committed
Add failing test for 'ToString() returns null bug'
1 parent 996427e commit 3190096

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// #Regression #NoMT #FSI
2+
// Microsoft.Analysis.Server overrides ToString() to return isNull
3+
// instead of a string. This would make FSI fail in pretty-printing
4+
// when displaying results.
5+
//<Expects status="success">val n : NullToString = </Expects>
6+
7+
type NullToString() =
8+
override __.ToString() = null;;
9+
10+
let n = NullToString();;
11+
#q;;
12+

tests/fsharpqa/Source/InteractiveSession/Misc/env.lst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ ReqENU SOURCE=E_InterfaceCrossConstrained02.fsx COMPILE_ONLY=1 FSIMODE=PIPE SC
2727

2828
SOURCE=EmptyList.fsx COMPILE_ONLY=1 FSIMODE=PIPE SCFLAGS="--nologo" # EmptyList.fsx
2929

30+
SOURCE=ToStringNull.fsx COMPILE_ONLY=1 FSIMODE=PIPE SCFLAGS="--nologo" # ToStringNull.fsx
31+
3032
# These are the regression tests for FSHARP1.0:5427
3133
# The scenario is a bit convoluted because of the way we end up doing the verification
3234
# In the last 2 cases, the verification is achieved by dumping the output of FSI to a file

0 commit comments

Comments
 (0)