Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
Updated fsstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
ncave committed Nov 2, 2018
1 parent d15ae18 commit cbd2578
Showing 3 changed files with 14 additions and 12 deletions.
10 changes: 5 additions & 5 deletions fcs/fcs-fable/fsstrings.fs
Original file line number Diff line number Diff line change
@@ -774,19 +774,19 @@ let resources =
"This expression is a function value, i.e. is missing arguments. Its type is {0}."
);
( "UnitTypeExpected",
"The result of this expression is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'."
"The result of this expression has type '{0}' and is implicitly ignored. Consider using 'ignore' to discard this value explicitly, e.g. 'expr |> ignore', or 'let' to bind the result to a name, e.g. 'let result = expr'."
);
( "UnitTypeExpectedWithEquality",
"The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'."
"The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'."
);
( "UnitTypeExpectedWithPossiblePropertySetter",
"The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{0}.{1} <- expression'."
"The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to set a value to a property, then use the '<-' operator e.g. '{1}.{2} <- expression'."
);
( "UnitTypeExpectedWithPossibleAssignment",
"The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{0} <- expression'."
"The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then mark the value 'mutable' and use the '<-' operator e.g. '{1} <- expression'."
);
( "UnitTypeExpectedWithPossibleAssignmentToMutable",
"The result of this equality expression is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{0} <- expression'."
"The result of this equality expression has type '{0}' and is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to mutate a value, then use the '<-' operator e.g. '{1} <- expression'."
);
( "RecursiveUseCheckedAtRuntime",
"This recursive use will be checked for initialization-soundness at runtime. This warning is usually harmless, and may be suppressed by using '#nowarn \"21\"' or '--nowarn:21'."
8 changes: 5 additions & 3 deletions fcs/fcs-fable/test/app.fs
Original file line number Diff line number Diff line change
@@ -34,13 +34,15 @@ let writeAllText (filePath:string) (text:string) = File.WriteAllText (filePath,
let main argv =
printfn "Parsing begins..."

let checker = InteractiveChecker.Create(references, readAllBytes)
let defines = [||]
let checker = InteractiveChecker.Create(references, readAllBytes, defines)

let projectFileName = "project"
let fileName = "test_script.fsx"
let source = readAllText fileName

// let parseResults = checker.ParseScript(fileName,source)
let parseResults, typeCheckResults, projectResults = checker.ParseAndCheckScript(fileName, source)
//let parseResults, typeCheckResults, projectResults = checker.ParseAndCheckProject(projectFileName, [|fileName|], [|source|])
let parseResults, typeCheckResults, projectResults = checker.ParseAndCheckScript(projectFileName, fileName, source)

printfn "parseResults.ParseHadErrors: %A" parseResults.ParseHadErrors
printfn "parseResults.Errors: %A" parseResults.Errors
8 changes: 4 additions & 4 deletions fcs/fcs-fable/test/package.json
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@
"start": "node out/app"
},
"devDependencies": {
"babel-core": "^6.26.3",
"@babel/core": "^7.1.2",
"babel-preset-env": "^1.7.0",
"fable-splitter": "2.0.0-beta-002",
"rollup": "^0.66.2",
"rollup-plugin-fable": "2.0.0-beta-001"
"fable-splitter": "^2.0.2",
"rollup": "^0.66.6",
"rollup-plugin-fable": "^2.0.0"
}
}

0 comments on commit cbd2578

Please sign in to comment.