File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Clojure/Clojure/CljCompiler Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -36,21 +36,28 @@ public static class Compiler
3636
3737 #region Duplicate types
3838
39- static readonly Dictionary < String , Type > _duplicateTypeMap = new Dictionary < string , Type > ( ) ;
39+ static readonly Dictionary < String , Type > _evalTypeMap = new Dictionary < string , Type > ( ) ;
40+ static readonly Dictionary < String , Type > _compilerTypeMap = new Dictionary < string , Type > ( ) ;
4041
4142 internal static void RegisterDuplicateType ( Type type )
4243 {
43- _duplicateTypeMap [ type . FullName ] = type ;
44+ if ( Compiler . IsCompiling )
45+ _compilerTypeMap [ type . FullName ] = type ;
46+ else
47+ _evalTypeMap [ type . FullName ] = type ;
4448 }
4549
4650 internal static Type FindDuplicateType ( string typename )
4751 {
48- _duplicateTypeMap . TryGetValue ( typename , out Type type ) ;
52+ if ( Compiler . IsCompiling && _compilerTypeMap . TryGetValue ( typename , out Type compiledType ) )
53+ { return compiledType ; }
54+
55+ _evalTypeMap . TryGetValue ( typename , out Type type ) ;
4956 return type ;
5057 }
5158
5259 #endregion
53-
60+
5461 #region Symbols
5562
5663 public static readonly Symbol DefSym = Symbol . intern ( "def" ) ;
You can’t perform that action at this time.
0 commit comments