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

Commite5cdef9

Browse files
dsymelatkin
authored andcommitted
fix 362 - change assertion to compile error on unexpected depickling error
fixesdotnet#362closesdotnet#430commit22bf8ebAuthor: Don Syme <donsyme@fastmail.fm>Date: Sat May 9 12:08:27 2015 +0100 fix 362commitbc28158Author: Don Syme <donsyme@fastmail.fm>Date: Sat May 9 12:06:27 2015 +0100 fix 362 (2)commit6bfdeacAuthor: Don Syme <donsyme@fastmail.fm>Date: Sat May 9 11:58:48 2015 +0100 fix 362
1 parenta64ecb2 commite5cdef9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

‎src/fsharp/FSComp.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,3 +1341,4 @@ estApplyStaticArgumentsForMethodNotImplemented,"A type provider implemented GetS
13411341
3183,ppparsUnexpectedToken,"Unexpected token '%s' in preprocessor expression"
13421342
3184,ppparsIncompleteExpression,"Incomplete preprocessor expression"
13431343
3185,ppparsMissingToken,"Missing token '%s' in preprocessor expression"
1344+
3186,pickleMissingDefinition,"An error occurred while reading the F# metadata node at position %d in table '%s' of assembly '%s'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using."

‎src/fsharp/pickle.fs‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -723,13 +723,12 @@ let pickleObjWithDanglingCcus file g scope p x =
723723

724724
#endif
725725

726-
#if DEBUG
727726
letcheck(ilscope:ILScopeRef)(inMap:NodeInTable<_,_>)=
728727
for i=0to inMap.Count-1do
729728
letn= inMap.Get i
730729
ifnot(inMap.IsLinked n)then
731-
System.Diagnostics.Debug.Assert(false, sprintf"*** unpickle: osgn%d in table%s with IL scope%s had no matching declaration (was not fixed up)\nPlease report this warning. (Note for compiler developers: to get information about which item this index relates to, enable the conditional in Pickle.p_osgn_ref to refer to the given index number and recompile an identical copy of the source for the DLL containing the data being unpickled. A message will then be printed indicating the name of the item.\n" iinMap.Name ilscope.QualifiedName)
732-
#endif
730+
warning(Error(FSComp.SR.pickleMissingDefinition(i,inMap.Name, ilscope.QualifiedName), range0))
731+
// Note for compiler developers: to get information about which item this index relates to, enable the conditional in Pickle.p_osgn_ref to refer to the given index number and recompile an identical copy of the source for the DLL containing the data being unpickled. A message will then be printed indicating the name of the item.\n"
733732

734733
letunpickleObjWithDanglingCcus file ilscope(iILModule:ILModuleDef)u(phase2bytes:byte[])=
735734
letst2=
@@ -776,13 +775,11 @@ let unpickleObjWithDanglingCcus file ilscope (iILModule:ILModuleDef) u (phase2by
776775
ifile=file
777776
iILModule= iILModule}
778777
letres= u st1
779-
#if DEBUG
780778
#if LAZY_UNPICKLE
781779
#else
782780
check ilscope st1.itycons;
783781
check ilscope st1.ivals;
784782
check ilscope st1.itypars;
785-
#endif
786783
#endif
787784
res
788785

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp