File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1984,7 +1984,6 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
1984
1984
1985
1985
void visitMacroDecl (MacroDecl *MD) {
1986
1986
TypeChecker::checkDeclAttributes (MD);
1987
- // FIXME: Check for redeclarations
1988
1987
checkAccessControl (MD);
1989
1988
}
1990
1989
Original file line number Diff line number Diff line change @@ -13,6 +13,18 @@ internal struct X { } // expected-note{{type declared here}}
13
13
public macro createAnX: X = BuiltinMacros. Blah
14
14
// expected-error@-1{{macro cannot be declared public because its result type uses an internal type}}
15
15
16
+ macro m1: Int = A. B
17
+ macro m1: Float = A. B
18
+
19
+ macro m2: Int = A. B // expected-note{{'m2' previously declared here}}
20
+ macro m2: Int = A. B // expected-error{{invalid redeclaration of 'm2'}}
21
+
22
+ macro m3( _: Int ) -> Int = A . B
23
+ macro m3( _: Int ) -> Float = A . B
24
+
25
+ macro m4( _: Int ) -> Int = A . B // expected-note{{'m4' previously declared here}}
26
+ macro m4( _: Int ) -> Int = A . B // expected-error{{invalid redeclaration of 'm4'}}
27
+
16
28
func test( a: Int , b: Int ) {
17
29
// FIXME: Bad diagnostic.
18
30
let s = #stringify < Int , Int > ( a + b) // expected-error{{type of expression is ambiguous without more context}}
You can’t perform that action at this time.
0 commit comments