@@ -282,16 +282,16 @@ let NestedTypeRefForCompLoc cloc n =
282
282
mkILTyRef( cloc.clocScope, tyname)
283
283
| h:: t -> mkILNestedTyRef( cloc.clocScope, mkTopName cloc.clocNamespace h :: t, n)
284
284
285
- let CleanUpGeneratedTypeName ( nm : string ) =
285
+ let CleanUpGeneratedName ( nm : string ) =
286
286
if nm.IndexOfAny IllegalCharactersInTypeAndNamespaceNames = - 1 then
287
287
nm
288
288
else
289
289
( nm, IllegalCharactersInTypeAndNamespaceNames) ||> Array.fold ( fun nm c -> nm.Replace( string c, " -" ))
290
290
291
291
292
- let TypeNameForInitClass cloc = " <StartupCode$" + ( CleanUpGeneratedTypeName cloc.clocQualifiedNameOfFile) + " >.$" + cloc.clocTopImplQualifiedName
292
+ let TypeNameForInitClass cloc = " <StartupCode$" + ( CleanUpGeneratedName cloc.clocQualifiedNameOfFile) + " >.$" + ( CleanUpGeneratedName cloc.clocTopImplQualifiedName)
293
293
let TypeNameForImplicitMainMethod cloc = TypeNameForInitClass cloc + " $Main"
294
- let TypeNameForPrivateImplementationDetails cloc = " <PrivateImplementationDetails$" + ( CleanUpGeneratedTypeName cloc.clocQualifiedNameOfFile) + " >"
294
+ let TypeNameForPrivateImplementationDetails cloc = " <PrivateImplementationDetails$" + ( CleanUpGeneratedName cloc.clocQualifiedNameOfFile) + " >"
295
295
296
296
let CompLocForInitClass cloc =
297
297
{ cloc with clocEncl=[ TypeNameForInitClass cloc]; clocNamespace= None}
@@ -3881,7 +3881,7 @@ and GetIlxClosureFreeVars cenv m selfv eenvouter takenNames expr =
3881
3881
// Choose a name for the closure
3882
3882
let ilCloTypeRef =
3883
3883
// FSharp 1.0 bug 3404: System.Reflection doesn't like '.' and '`' in type names
3884
- let basenameSafeForUseAsTypename = CleanUpGeneratedTypeName basename
3884
+ let basenameSafeForUseAsTypename = CleanUpGeneratedName basename
3885
3885
let suffixmark = expr.Range
3886
3886
let cloName = globalStableNameGenerator.GetUniqueCompilerGeneratedName( basenameSafeForUseAsTypename, suffixmark, uniq)
3887
3887
NestedTypeRefForCompLoc eenvouter.cloc cloName
0 commit comments