mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Relax alias restrictions. (#7190)
Implement the alias rules from proposal #5389, wherein an alias is permitted so long as the target has a constant value. While that proposal is not yet accepted, this seems like a reasonable basis for further iteration, and will be useful for the examples we're currently pursuing.
This commit is contained in:
@@ -335,7 +335,7 @@ fn B() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {} {}
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %B: %A.type = alias_binding B, %A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %B: %A.type = alias_binding B, %A.ref [concrete = constants.%A]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @A();
|
||||
|
||||
Reference in New Issue
Block a user