Skip to content

Commit

Permalink
Causes "A method error occurred before the base module was defined. A…
Browse files Browse the repository at this point in the history
…borting..."
  • Loading branch information
Arch D. Robison committed Feb 26, 2016
1 parent 82c5b22 commit 683723d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
10 changes: 6 additions & 4 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
#abstract Ref{T}
#bitstype {32|64} Ptr{T} <: Ref{T}

#immutable Banana{T}
# value::T
#end

# types for the front end

#type Expr
Expand Down Expand Up @@ -281,6 +277,12 @@ type Box
Box() = new()
end

immutable Banana{T}
value::T
Banana() = new()
Banana(x::T) = new(x)
end

# constructors for built-in types

type WeakRef
Expand Down
1 change: 1 addition & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ void jl_get_builtin_hooks(void)
jl_utf8_string_type = (jl_datatype_t*)core("UTF8String");
jl_symbolnode_type = (jl_datatype_t*)core("SymbolNode");
jl_weakref_type = (jl_datatype_t*)core("WeakRef");
jl_banana_type = (jl_datatype_t*)core("Banana");

jl_array_uint8_type = jl_apply_type((jl_value_t*)jl_array_type,
jl_svec2(jl_uint8_type, jl_box_long(1)));
Expand Down
8 changes: 0 additions & 8 deletions src/jltypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3529,14 +3529,6 @@ void jl_init_types(void)
(jl_datatype_t*)jl_apply_type((jl_value_t*)jl_ref_type, tv), tv,
sizeof(void*)*8);

// Banana{T}
tv = jl_svec1(tvar("T"));
jl_banana_type =
jl_new_datatype(jl_symbol("Banana"), jl_any_type, tv,
jl_svec(1, jl_symbol("value")),
tv,
0, 0, 1);

// Type{T}
jl_typetype_tvar = jl_new_typevar(jl_symbol("T"),
(jl_value_t*)jl_bottom_type,(jl_value_t*)jl_any_type);
Expand Down

0 comments on commit 683723d

Please sign in to comment.