File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/cmd/compile/internal/gc Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ func TestInvalidLang(t *testing.T) {
41
41
t .Error ("compilation with -lang=go9.99 succeeded unexpectedly" )
42
42
}
43
43
44
+ // This test will have to be adjusted if we ever reach 1.99 or 2.0.
45
+ if testLang (t , "go1.99" , src , outfile ) == nil {
46
+ t .Error ("compilation with -lang=go1.99 succeeded unexpectedly" )
47
+ }
48
+
44
49
if testLang (t , "go1.8" , src , outfile ) == nil {
45
50
t .Error ("compilation with -lang=go1.8 succeeded unexpectedly" )
46
51
}
Original file line number Diff line number Diff line change @@ -1444,7 +1444,7 @@ func checkLang() {
1444
1444
if err != nil {
1445
1445
log .Fatalf ("internal error parsing default lang %q: %v" , def , err )
1446
1446
}
1447
- if langWant .major > defVers .major || (langWant .major == defVers .major && langWant .major > defVers .minor ) {
1447
+ if langWant .major > defVers .major || (langWant .major == defVers .major && langWant .minor > defVers .minor ) {
1448
1448
log .Fatalf ("invalid value %q for -lang: max known version is %q" , flag_lang , def )
1449
1449
}
1450
1450
}
You can’t perform that action at this time.
0 commit comments