forked from JuliaTesting/Aqua.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Enhance
test_ambiguities
(JuliaTesting#144)"
This reverts commit f4c3352.
- Loading branch information
1 parent
f4c3352
commit 295c0ce
Showing
4 changed files
with
33 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Aqua" | ||
uuid = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
authors = ["Takafumi Arakaki <[email protected]> and contributors"] | ||
version = "0.7.0-DEV" | ||
version = "0.6.4" | ||
|
||
[deps] | ||
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,13 @@ | ||
module PkgWithAmbiguities | ||
|
||
# 1 ambiguity | ||
f(::Any, ::Int) = 1 | ||
f(::Int, ::Any) = 2 | ||
|
||
abstract type AbstractType end | ||
struct SingletonType <: AbstractType end | ||
|
||
struct ConcreteType <: AbstractType | ||
x::Int | ||
end | ||
|
||
# 2 ambiguities | ||
SingletonType(::Any, ::Any, ::Int) = 1 | ||
SingletonType(::Any, ::Int, ::Int) = 2 | ||
SingletonType(::Int, ::Any, ::Any) = 3 | ||
|
||
# 1 ambiguity | ||
(::SingletonType)(::Any, ::Float64) = 1 | ||
(::SingletonType)(::Float64, ::Any) = 2 | ||
|
||
# 3 ambiguities | ||
ConcreteType(::Any, ::Any, ::Int) = 1 | ||
ConcreteType(::Any, ::Int, ::Any) = 2 | ||
ConcreteType(::Int, ::Any, ::Any) = 3 | ||
|
||
# 1 ambiguity | ||
(::ConcreteType)(::Any, ::Float64) = 1 | ||
(::ConcreteType)(::Float64, ::Any) = 2 | ||
|
||
|
||
@static if VERSION >= v"1.3-" | ||
abstract type AbstractParameterizedType{T} end | ||
struct ConcreteParameterizedType{T} <: AbstractParameterizedType{T} end | ||
(::AbstractParameterizedType{T})(::Tuple{Tuple{Int}}) where {T} = 1 | ||
(::ConcreteParameterizedType)(::Tuple) = 2 | ||
abstract type AbstractType{T} end | ||
struct ConcreteType{T} <: AbstractType{T} end | ||
(::AbstractType{T})(::Tuple{Tuple{Int}}) where {T} = 1 | ||
(::ConcreteType)(::Tuple) = 2 | ||
end | ||
|
||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters