Created
October 6, 2016 05:53
-
-
Save chadaustin/da8d6453ce8d95689cd00df3713a27f2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
trait T1 {} | |
trait T2 {} | |
impl T1 Number {} | |
impl T2 Number {} | |
fun a<T: T1>(_: {...: T}) { | |
} | |
fun b<T: T2>(_: {...: T}) { | |
} | |
fun wantNumber(_: Number) {} | |
fun wantString(_: String) {} | |
fun f(q) { | |
a(q) | |
wantNumber(q.foo) | |
b(q) | |
wantString(q.bar) | |
} | |
fun main() { | |
_debug_type(f) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment