-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
`method` and several other words were previously reservered keywords, but aren't any more. See [RFC](https://github.com/fsharp/fslang-design/blob/master/FSharp-4.1/FS-1016-unreserve-keywords.md), [PR](dotnet/fsharp#1279)
- Loading branch information
Showing
4 changed files
with
124 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Escape all reserved keywords. | ||
* | ||
* Some previously reserved keywords, aren't reserved any more. | ||
* See [RFC](https://github.com/fsharp/fslang-design/blob/master/FSharp-4.1/FS-1016-unreserve-keywords.md), [PR](https://github.com/dotnet/fsharp/pull/1279) | ||
*/ | ||
export interface I { | ||
// OCAML keywords | ||
|
||
asr: string | ||
land: string | ||
lor: string | ||
lsl: string | ||
lsr: string | ||
lxor: string | ||
mod: string | ||
sig: string | ||
|
||
// F# reserved keywords | ||
|
||
break: string | ||
checked: string | ||
component: string | ||
const: string | ||
constraint: string | ||
continue: string | ||
event: string | ||
external: string | ||
include: string | ||
mixin: string | ||
parallel: string | ||
process: string | ||
protected: string | ||
pure: string | ||
sealed: string | ||
tailcall: string | ||
trait: string | ||
virtual: string | ||
|
||
// not reserved any more | ||
/** Not reserved any more */ | ||
atomic: string | ||
/** Not reserved any more */ | ||
constructor: string | ||
/** Not reserved any more */ | ||
eager: string | ||
/** Not reserved any more */ | ||
functor: string | ||
/** Not reserved any more */ | ||
measure: string | ||
/** Not reserved any more */ | ||
method: string | ||
/** Not reserved any more */ | ||
object: string | ||
/** Not reserved any more */ | ||
recursive: string | ||
/** Not reserved any more */ | ||
volatile: string | ||
} |
59 changes: 59 additions & 0 deletions
59
test/fragments/regressions/#304-reserved-keywords.expected.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// ts2fable 0.0.0 | ||
module rec ``#304-reserved-keywords`` | ||
open System | ||
open Fable.Core | ||
open Fable.Core.JS | ||
|
||
|
||
/// <summary> | ||
/// Escape all reserved keywords. | ||
/// | ||
/// Some previously reserved keywords, aren't reserved any more. | ||
/// See <see href="https://github.com/fsharp/fslang-design/blob/master/FSharp-4.1/FS-1016-unreserve-keywords.md">RFC</see>, <see href="https://github.com/dotnet/fsharp/pull/1279">PR</see> | ||
/// </summary> | ||
type [<AllowNullLiteral>] I = | ||
abstract ``asr``: string with get, set | ||
abstract ``land``: string with get, set | ||
abstract ``lor``: string with get, set | ||
abstract ``lsl``: string with get, set | ||
abstract ``lsr``: string with get, set | ||
abstract ``lxor``: string with get, set | ||
abstract ``mod``: string with get, set | ||
abstract ``sig``: string with get, set | ||
abstract ``break``: string with get, set | ||
abstract ``checked``: string with get, set | ||
abstract ``component``: string with get, set | ||
abstract ``const``: string with get, set | ||
abstract ``constraint``: string with get, set | ||
abstract ``continue``: string with get, set | ||
abstract ``event``: string with get, set | ||
abstract ``external``: string with get, set | ||
abstract ``include``: string with get, set | ||
abstract ``mixin``: string with get, set | ||
abstract ``parallel``: string with get, set | ||
abstract ``process``: string with get, set | ||
abstract ``protected``: string with get, set | ||
abstract ``pure``: string with get, set | ||
abstract ``sealed``: string with get, set | ||
abstract ``tailcall``: string with get, set | ||
abstract ``trait``: string with get, set | ||
abstract ``virtual``: string with get, set | ||
/// Not reserved any more | ||
abstract atomic: string with get, set | ||
/// Not reserved any more | ||
abstract constructor: string with get, set | ||
/// Not reserved any more | ||
abstract eager: string with get, set | ||
/// Not reserved any more | ||
abstract functor: string with get, set | ||
/// Not reserved any more | ||
abstract measure: string with get, set | ||
/// Not reserved any more | ||
abstract method: string with get, set | ||
/// Not reserved any more | ||
abstract object: string with get, set | ||
/// Not reserved any more | ||
abstract recursive: string with get, set | ||
/// Not reserved any more | ||
abstract volatile: string with get, set | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters