Files
swift-mirror/test/Sema/integer_generics_spelling.swift
Joe Groff 5a09c0b4e0 Canonicalize different spellings of the same integer generic parameter.
`Foo<256>`, `Foo<2_56>`, and `Foo<0x100>` are all canonically the same type.
Fixes rdar://144736386.
2025-04-03 18:56:00 -07:00

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)
}