Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf5afdc

Browse files
authored
Merge pull requestdotnet#26 from forki/literal-value-bug
Use WithFieldMarshal
2 parentsccd130a +4b131f8 commitcf5afdc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎src/absil/il.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ type ILFieldDef =
15591559
memberx.WithSpecialName(condition)={ xwith Attributes= x.Attributes|> conditionalAdd condition(FieldAttributes.SpecialName||| FieldAttributes.RTSpecialName)}
15601560
memberx.WithNotSerialized(condition)={ xwith Attributes= x.Attributes|> conditionalAdd condition FieldAttributes.NotSerialized}
15611561
memberx.WithLiteralDefaultValue(literal)={ xwith LiteralValue= literal; Attributes= x.Attributes|> conditionalAdd literal.IsSome(FieldAttributes.Literal||| FieldAttributes.HasDefault)}
1562-
memberx.WithHasFieldMarshal(condition)={ xwith Attributes= x.Attributes|> conditionalAddcondition FieldAttributes.HasFieldMarshal}
1562+
memberx.WithFieldMarshal(marshal)={ xwithMarshal= marshal;Attributes= x.Attributes|> conditionalAddmarshal.IsSome FieldAttributes.HasFieldMarshal}
15631563

15641564

15651565
// Index table by name. Keep a canonical list to make sure field order is not disturbed for binary manipulation.

‎src/absil/il.fsi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ type ILFieldDef =
11391139
memberWithSpecialName:bool->ILFieldDef
11401140
memberWithNotSerialized:bool->ILFieldDef
11411141
memberWithLiteralDefaultValue:ILFieldInit option->ILFieldDef
1142-
memberWithHasFieldMarshal:bool->ILFieldDef
1142+
memberWithFieldMarshal:ILNativeType option->ILFieldDef
11431143

11441144
/// Tables of fields. Logically equivalent to a list of fields but
11451145
/// the table is kept in a form optimized for looking up fields by

‎src/fsharp/IlxGen.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6350,15 +6350,15 @@ and GenTypeDef cenv mgbuf lazyInitInfo eenv m (tycon:Tycon) =
63506350
Data= None
63516351
LiteralValue= None
63526352
Offset= ilFieldOffset
6353-
Marshal=ilFieldMarshal
6353+
Marshal=None
63546354
CustomAttrs= mkILCustomAttrs(GenAttrs cenv eenv fattribs@ extraAttribs)}
63556355
letfdef=
63566356
fdef.WithAccess(access)
63576357
.WithStatic(isStatic)
63586358
.WithSpecialName(ilFieldName="value__"&& tycon.IsEnumTycon)
63596359
.WithNotSerialized(ilNotSerialized)
63606360
.WithLiteralDefaultValue(literalValue)
6361-
.WithHasFieldMarshal(ilFieldMarshal.IsSome)
6361+
.WithFieldMarshal(ilFieldMarshal)
63626362
yield fdef
63636363

63646364
if requiresExtraFieldthen

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp