You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: Method definition (::Type{CurricularAnalytics.DegreePlan})(AbstractString, CurricularAnalytics.Curriculum, Array{CurricularAnalytics.Term, 1}) inmodule CurricularAnalytics at /Users/hayden/.julia/packages/CurricularAnalytics/qqlQU/src/DataTypes/DegreePlan.jl:74 overwritten at /Users/hayden/.julia/packages/CurricularAnalytics/qqlQU/src/DataTypes/DegreePlan.jl:99.** incremental compilation may be fatally broken for this module**
Below is an explanation of why. Fix needs to be implemented.
# assert type check, so check if 1+2 yields abstractfloat (does not)
julia> (1+2)::AbstractFloat
ERROR: TypeError:in typeassert, expected AbstractFloat, got a value of type Int64
Stacktrace:
[1] top-level scope at REPL[3]:1# yields an Int, of which number is a supertype, so it does yield a number
julia> (1+2)::Number3# A is a Course
julia> A =Course("A", 3, institution="ACME State", prefix="BW", num="101", canonical_name="Baskets I")
Course(2159971713, Dict{Int64,Int64}(), "A", 3, "BW", "101", "ACME State", "", "", Course[], "Baskets I", Dict{Int64,Requisite}(), LearningOutcome[], Dict{String,Any}(), Dict{String,Any}(), 0.5)
julia>supertypes(Course)
(Course, CurricularAnalytics.AbstractCourse, Any)
# A is an AbstractCourse since that's a supertype of Course
julia> (A)::CurricularAnalytics.AbstractCourseCourse(2159971713, Dict{Int64,Int64}(), "A", 3, "BW", "101", "ACME State", "", "", Course[], "Baskets I", Dict{Int64,Requisite}(), LearningOutcome[], Dict{String,Any}(), Dict{String,Any}(), 0.5)
# Create array with just A
julia> arr = [A]
1-element Array{Course,1}:Course(2159971713, Dict{Int64,Int64}(), "A", 3, "BW", "101", "ACME State", "", "", Course[], "Baskets I", Dict{Int64,Requisite}(), LearningOutcome[], Dict{String,Any}(), Dict{String,Any}(), 0.5)
# Array{Course,1} is not an Array of AbstractCourses.
julia> arr::Array{CurricularAnalytics.AbstractCourse,1}
ERROR: TypeError:in typeassert, expected Array{CurricularAnalytics.AbstractCourse,1}, got a value of type Array{Course,1}
Stacktrace:
[1] top-level scope at REPL[19]:1# However, using syntax Array{<:Integer} refers to all arrays whose element type is some kind of Integer# Array{Course,1} is an array whose element is some type of AbstractCourse
julia> arr::Array{<:CurricularAnalytics.AbstractCourse,1}1-element Array{Course,1}:Course(2159971713, Dict{Int64,Int64}(), "A", 3, "BW", "101", "ACME State", "", "", Course[], "Baskets I", Dict{Int64,Requisite}(), LearningOutcome[], Dict{String,Any}(), Dict{String,Any}(), 0.5)
# for sanity, show that an array of Int64 is not an array whose elements are some type of AbstractCourse.
julia> nums = [1,2,3]
3-element Array{Int64,1}:123
julia> nums::Array{<:CurricularAnalytics.AbstractCourse,1}
ERROR: TypeError:in typeassert, expected Array{var"#s3",1} wherevar"#s3"<:CurricularAnalytics.AbstractCourse, got a value of type Array{Int64,1}
Stacktrace:
[1] top-level scope at REPL[22]:1
The text was updated successfully, but these errors were encountered:
Dreaded warning:
Below is an explanation of why. Fix needs to be implemented.
The text was updated successfully, but these errors were encountered: