mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`Foo<256>`, `Foo<2_56>`, and `Foo<0x100>` are all canonically the same type. Fixes rdar://144736386.
16 lines
251 B
Swift
16 lines
251 B
Swift
// RUN: %target-swift-frontend -disable-availability-checking -typecheck -verify %s
|
|
|
|
struct Foo<let n: Int> {}
|
|
|
|
func foo(x: Foo<256>) {}
|
|
|
|
func bar(x: Foo<0x100>) {
|
|
foo(x: x)
|
|
}
|
|
|
|
func oof(x: Foo<-256>) {}
|
|
|
|
func rab(x: Foo<-0x100>) {
|
|
oof(x: x)
|
|
}
|